@jjlmoya/utils-civic 1.2.0 → 1.3.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.
- package/package.json +1 -1
- package/src/category/index.ts +2 -1
- package/src/entries.ts +2 -0
- package/src/tests/locale_completeness.test.ts +1 -1
- package/src/tests/tool_validation.test.ts +1 -1
- package/src/tool/coalition-majority-calculator/bibliography.astro +6 -0
- package/src/tool/coalition-majority-calculator/bibliography.ts +12 -0
- package/src/tool/coalition-majority-calculator/coalition-majority-calculator.css +467 -0
- package/src/tool/coalition-majority-calculator/component.astro +62 -0
- package/src/tool/coalition-majority-calculator/contract.test.ts +14 -0
- package/src/tool/coalition-majority-calculator/controller.ts +89 -0
- package/src/tool/coalition-majority-calculator/dom-views.ts +145 -0
- package/src/tool/coalition-majority-calculator/entry.ts +28 -0
- package/src/tool/coalition-majority-calculator/evaluator.ts +13 -0
- package/src/tool/coalition-majority-calculator/i18n/de.ts +51 -0
- package/src/tool/coalition-majority-calculator/i18n/en.ts +74 -0
- package/src/tool/coalition-majority-calculator/i18n/es.ts +51 -0
- package/src/tool/coalition-majority-calculator/i18n/fr.ts +12 -0
- package/src/tool/coalition-majority-calculator/i18n/id.ts +45 -0
- package/src/tool/coalition-majority-calculator/i18n/it.ts +12 -0
- package/src/tool/coalition-majority-calculator/i18n/ja.ts +21 -0
- package/src/tool/coalition-majority-calculator/i18n/ko.ts +21 -0
- package/src/tool/coalition-majority-calculator/i18n/nl.ts +12 -0
- package/src/tool/coalition-majority-calculator/i18n/pl.ts +12 -0
- package/src/tool/coalition-majority-calculator/i18n/pt.ts +12 -0
- package/src/tool/coalition-majority-calculator/i18n/ru.ts +12 -0
- package/src/tool/coalition-majority-calculator/i18n/sv.ts +12 -0
- package/src/tool/coalition-majority-calculator/i18n/tr.ts +12 -0
- package/src/tool/coalition-majority-calculator/i18n/zh.ts +12 -0
- package/src/tool/coalition-majority-calculator/index.ts +11 -0
- package/src/tool/coalition-majority-calculator/logic.test.ts +60 -0
- package/src/tool/coalition-majority-calculator/logic.ts +146 -0
- package/src/tool/coalition-majority-calculator/seo.astro +12 -0
- package/src/tool/coalition-majority-calculator/storage.ts +32 -0
- package/src/tool/coalition-majority-calculator/ui.ts +80 -0
- package/src/tools.ts +2 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
|
|
2
|
+
import { bibliography } from '../bibliography';
|
|
3
|
+
import type { CoalitionMajorityLocaleContent } from '../entry';
|
|
4
|
+
import type { CoalitionMajorityUI } from '../ui';
|
|
5
|
+
|
|
6
|
+
const ui: CoalitionMajorityUI = {
|
|
7
|
+
addParty: `Aggiungi partito`, allCoalitions: `Tutte le coalizioni vincenti`, calculate: `Calcola coalizioni`, chamberSeats: `Seggi totali`, coalitionSceneLabel: `Costellazione delle coalizioni`, criticalDefections: `Defezioni critiche`, emptyState: `Aggiungi almeno due partiti e inserisci i loro seggi.`, explanation: `Il modello presume che ogni partito possa aderire a qualsiasi combinazione. Misura l'aritmetica dei seggi, non la compatibilità politica.`, edgeCasesText: `I nomi vuoti o duplicati diventano univoci. Un partito con zero seggi non può mai essere decisivo. Oltre 20 partiti la ricerca esatta si interrompe.`, edgeCasesTitle: `Casi limite e avvisi`, filterCoalitions: `Mostra`, maximumParties: `Massimo 20 partiti perché l'enumerazione completa cresce come 2 elevato a N.`, majorityThreshold: `Soglia di maggioranza`, methodTitle: `Modello applicato`, methodText: `Viene controllato ogni sottoinsieme non vuoto. Una coalizione vince quando raggiunge la soglia dichiarata. Un partito è decisivo se la sua uscita fa perdere una coalizione vincente.`, minimalCoalition: `Coalizione vincente minima`, noMatchingCoalitions: `Nessuna coalizione corrisponde a questo filtro.`, noPivots: `Nessun partito è decisivo con questa soglia.`, none: `Nessuno`, notDoText: `Non valuta ideologia, compatibilità politica, negoziazione, legittimità, stabilità o la probabilità che si formi un governo.`, notDoTitle: `Cosa non fa questo strumento`, partyName: `Nome del partito`, partySeats: `Seggi`, partyTable: `Dettagli della coalizione`, pivotal: `decisivo`, pivotalParty: `Partito decisivo`, redundantMembers: `Membri ridondanti`, removeParty: `Rimuovi partito`, reset: `Ripristina esempio`, resultTitle: `Mappa delle coalizioni`, seats: `seggi`, surplus: `surplus`, surplusCoalition: `Coalizione con surplus`, threshold: `Soglia`, thresholdHint: `Una coalizione vince quando i suoi seggi raggiungono o superano questa soglia.`, totalCoalitions: `Coalizioni non vuote possibili`, winningCoalitions: `Coalizioni vincenti`,
|
|
8
|
+
};
|
|
9
|
+
const softwareApplication: SoftwareApplication = { '@type': `SoftwareApplication`, name: `Calcolatore della maggioranza delle coalizioni`, applicationCategory: `EducationalApplication`, operatingSystem: `Any`, description: `Elenca coalizioni pesate per seggi, gruppi vincenti minimi e partiti decisivi sotto una soglia dichiarata.`, url: `https://gamebob.dev/it/calcolatore-maggioranza-coalizioni`, offers: { '@type': `Offer`, price: `0`, priceCurrency: `EUR` } };
|
|
10
|
+
const faqPage: FAQPage = { '@type': `FAQPage`, mainEntity: [{ '@type': `Question`, name: `Quando una coalizione è minima?`, acceptedAnswer: { '@type': `Answer`, text: `È minima quando l'uscita di qualsiasi membro la porta sotto la soglia di seggi dichiarata. Una coalizione con surplus resta vincente dopo l'uscita di almeno un membro.` } }, { '@type': `Question`, name: `Cosa significa decisivo?`, acceptedAnswer: { '@type': `Answer`, text: `Un partito viene contato come decisivo ogni volta che la sua uscita trasforma una coalizione vincente in perdente. La sua quota è divisa per tutte le defezioni critiche.` } }, { '@type': `Question`, name: `Il calcolatore prevede un governo reale?`, acceptedAnswer: { '@type': `Answer`, text: `No. Valuta solo i pesi dei seggi e la soglia inseriti. Ideologia, negoziazione, sostegno di minoranza e regole costituzionali sono fuori dal modello.` } }, { '@type': `Question`, name: `Perché il limite è di 20 partiti?`, acceptedAnswer: { '@type': `Answer`, text: `Lo strumento verifica ogni sottoinsieme non vuoto. Venti partiti producono già 1.048.575 combinazioni, un limite pratico per il browser.` } }] };
|
|
11
|
+
const howTo: HowTo = { '@type': `HowTo`, name: `Esplorare una maggioranza ponderata`, step: [{ '@type': `HowToStep`, name: `Inserisci i partiti`, text: `Aggiungi ogni partito e inserisci il suo peso in seggi. Mantieni nomi distinti per verificare il risultato.` }, { '@type': `HowToStep`, name: `Imposta la soglia`, text: `Inserisci il numero di seggi che una coalizione deve raggiungere.` }, { '@type': `HowToStep`, name: `Osserva la costellazione`, text: `Cerca gli anelli colorati e confronta i conteggi decisivi con i seggi.` }, { '@type': `HowToStep`, name: `Leggi la tabella`, text: `Confronta coalizioni minime, surplus e membri ridondanti.` }, { '@type': `HowToStep`, name: `Prova un altro scenario`, text: `Cambia un solo numero di seggi o la soglia alla volta.` }] };
|
|
12
|
+
export const content: CoalitionMajorityLocaleContent = { slug: `calcolatore-maggioranza-coalizioni`, title: `Calcolatore della maggioranza delle coalizioni`, description: `Esplora ogni coalizione basata sui seggi con una soglia dichiarata. Trova gruppi minimi vincenti, surplus e partiti decisivi.`, ui, seo: [{ type: `title`, text: `Quali combinazioni di seggi raggiungono la maggioranza`, level: 2 }, { type: `paragraph`, html: `Una coalizione vince quando i seggi dei suoi membri raggiungono o superano la soglia che dichiari. Il calcolatore elenca ogni combinazione non vuota e mostra il surplus esatto, così puoi controllare perché un gruppo vince.` }, { type: `title`, text: `Coalizioni minime e coalizioni con surplus`, level: 2 }, { type: `paragraph`, html: `Una coalizione vincente minima perde la maggioranza quando esce un membro qualsiasi. Una coalizione con surplus resta sopra la soglia dopo l'uscita di uno o più membri. È una distinzione aritmetica, non una previsione della stabilità politica.` }, { type: `table`, headers: [`Risultato`, `Test applicato`, `Cosa mostra`], rows: [[`Coalizione vincente`, `I seggi raggiungono la soglia.`, `I gruppi che possono vincere in linea di principio.`], [`Coalizione vincente minima`, `Ogni membro è necessario.`, `I gruppi senza surplus aritmetico.`], [`Coalizione con surplus`, `Almeno un membro può uscire e il gruppo vince ancora.`, `Dove una maggioranza ha partner ridondanti.`]] }, { type: `title`, text: `Leggere i partiti decisivi come aritmetica dei seggi`, level: 2 }, { type: `paragraph`, html: `Il conteggio decisivo usa un test di defezione critica nello stile di Banzhaf. Un partito conta quando la sua uscita trasforma una coalizione vincente in perdente. La quota è normalizzata su tutte le defezioni critiche dello scenario.` }, { type: `list`, items: [`Parti dal totale dei seggi e usa la soglia della tua regola.`, `Mantieni la stessa soglia quando confronti due distribuzioni.`, `Controlla i membri ridondanti prima di interpretare la lista dei decisivi.`, `Cambia un partito alla volta per capire la sensibilità.`, `Tratta nomi duplicati e partiti senza seggi come problemi di dati.`] }, { type: `title`, text: `Una ricerca esatta con un limite`, level: 2 }, { type: `paragraph`, html: `Per N partiti, il calcolatore valuta 2 elevato a N meno 1 coalizioni non vuote. Il limite di 20 mantiene la ricerca trasparente e utilizzabile nel browser. La tabella mostra un sottoinsieme leggibile, mentre i totali coprono tutta la ricerca.` }, { type: `tip`, title: `Le soglie sono ipotesi, non leggi`, html: `Il calcolatore non riconosce una regola costituzionale, un'investitura o una maggioranza parlamentare valida. Inserisci tu la soglia e conserva la regola accanto al risultato.` }, { type: `title`, text: `Cosa il modello non può dedurre`, level: 2 }, { type: `paragraph`, html: `I seggi descrivono la capacità di superare un numero, non la volontà di cooperare. Il modello non valuta ideologia, distanza politica, trattative, legittimità, stabilità o sostegno esterno.` }, { type: `tip`, title: `Usa il risultato come traccia di controllo`, html: `Quando un partito è decisivo, trova una coalizione vincente in cui la sua uscita supera la soglia verso il basso. Per una coalizione con surplus, esamina i membri ridondanti.` }], faq: [{ question: `Quando una coalizione è minima?`, answer: `Quando l'uscita di qualsiasi membro la fa perdere. Se almeno un membro può uscire e la soglia resta raggiunta, la coalizione ha surplus.` }, { question: `Cosa significa decisivo?`, answer: `Un partito è decisivo in ogni coalizione vincente che diventa perdente senza di lui. La quota è il conteggio critico diviso per il totale critico.` }, { question: `Prevede un governo reale?`, answer: `No. Valuta solo l'aritmetica dei seggi. Compatibilità politica, negoziazione e regole costituzionali sono escluse.` }, { question: `Perché il limite è 20?`, answer: `La ricerca esatta controlla 2 elevato a N meno 1 combinazioni. Con 20 partiti sono già 1.048.575.` }], bibliography, howTo: [{ name: `Inserisci i partiti`, text: `Aggiungi ogni partito con i seggi e un nome distinto.` }, { name: `Imposta la soglia`, text: `Indica quanti seggi servono per vincere.` }, { name: `Esamina i decisivi`, text: `Usa anelli e conteggi per individuare i partiti necessari.` }, { name: `Leggi la tabella`, text: `Confronta gruppi minimi, surplus e membri ridondanti.` }, { name: `Cambia un'ipotesi`, text: `Modifica un numero di seggi o la soglia alla volta.` }], schemas: [softwareApplication, faqPage, howTo] as unknown as Record<string, unknown>[] };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
|
|
2
|
+
import { bibliography } from '../bibliography';
|
|
3
|
+
import type { CoalitionMajorityLocaleContent } from '../entry';
|
|
4
|
+
import type { CoalitionMajorityUI } from '../ui';
|
|
5
|
+
|
|
6
|
+
const ui: CoalitionMajorityUI = {
|
|
7
|
+
addParty: '政党を追加', allCoalitions: 'すべての勝利連合', calculate: '連合を計算', chamberSeats: '総議席', coalitionSceneLabel: '連合の構図', criticalDefections: '決定的な離脱', emptyState: '2つ以上の政党を追加し、議席数を入力してください。', explanation: 'このモデルは、一覧の各政党がどの組み合わせにも参加できると仮定します。測定するのは議席の算術であり、政治的な相性ではありません。', edgeCasesText: '空白名や重複名は一意化されます。議席ゼロの政党は決定的になりません。20政党を超えると厳密な探索を停止します。', edgeCasesTitle: '境界条件と警告', filterCoalitions: '表示', maximumParties: '全列挙は2のN乗で増えるため、最大20政党です。', majorityThreshold: '過半数の基準', methodTitle: '適用したモデル', methodText: '空でないすべての部分集合を調べます。連合は指定した基準以上で勝利します。離脱によって勝利連合が敗北する政党を決定的とします。', minimalCoalition: '最小勝利連合', noMatchingCoalitions: 'このフィルターに一致する連合はありません。', noPivots: 'この基準では決定的な政党はありません。', none: 'なし', notDoText: '思想、政策の相性、交渉、正統性、安定性、実際に政権が成立するかどうかは評価しません。', notDoTitle: 'このツールが扱わないこと', partyName: '政党名', partySeats: '議席', partyTable: '連合の詳細', pivotal: '決定的', pivotalParty: '決定的な政党', redundantMembers: '冗長なメンバー', removeParty: '政党を削除', reset: '例をリセット', resultTitle: '連合マップ', seats: '議席', surplus: '余剰', surplusCoalition: '余剰のある連合', threshold: '基準', thresholdHint: '連合の議席がこの基準以上になると勝利します。', totalCoalitions: '可能な空でない連合', winningCoalitions: '勝利連合',
|
|
8
|
+
};
|
|
9
|
+
const softwareApplication: SoftwareApplication = { '@type': 'SoftwareApplication', name: '連合過半数計算機', applicationCategory: 'EducationalApplication', operatingSystem: 'Any', description: '指定した基準の下で、議席による連合、最小勝利連合、決定的な政党を列挙します。', url: 'https://gamebob.dev/ja/coalition-majority-calculator', offers: { '@type': 'Offer', price: '0', priceCurrency: 'JPY' } };
|
|
10
|
+
const faqPage: FAQPage = { '@type': 'FAQPage', mainEntity: [
|
|
11
|
+
{ '@type': 'Question', name: '最小連合とは何ですか?', acceptedAnswer: { '@type': 'Answer', text: 'どのメンバーが1つ抜けても指定した議席基準を下回る連合です。余剰のある連合は、少なくとも1つのメンバーが抜けても勝利します。' } },
|
|
12
|
+
{ '@type': 'Question', name: '決定的とは何ですか?', acceptedAnswer: { '@type': 'Answer', text: 'その政党が抜けると、ある勝利連合が敗北に変わる場合に決定的と数えます。表示割合は、すべての決定的な離脱に対する割合です。' } },
|
|
13
|
+
{ '@type': 'Question', name: '実際の政権を予測しますか?', acceptedAnswer: { '@type': 'Answer', text: 'いいえ。入力された議席と基準の算術だけを評価します。思想、交渉、少数派の支援、憲法上の規則は対象外です。' } },
|
|
14
|
+
{ '@type': 'Question', name: 'なぜ20政党までですか?', acceptedAnswer: { '@type': 'Answer', text: '空でないすべての部分集合を調べるためです。20政党ではすでに1,048,575通りとなり、ブラウザーで扱いやすい上限になります。' } },
|
|
15
|
+
] };
|
|
16
|
+
const howTo: HowTo = { '@type': 'HowTo', name: '議席の重みを持つ過半数を調べる', step: [
|
|
17
|
+
{ '@type': 'HowToStep', name: '政党を入力', text: '各政党と議席数を追加します。名前を分けると結果を確認しやすくなります。' }, { '@type': 'HowToStep', name: '基準を設定', text: '連合が勝利するために必要な議席数を入力します。' }, { '@type': 'HowToStep', name: '構図を確認', text: '色の付いた輪と決定的な回数を議席数と比較します。' }, { '@type': 'HowToStep', name: '表を読む', text: '最小勝利連合、余剰、冗長なメンバーを比較します。' }, { '@type': 'HowToStep', name: '別の条件を試す', text: '一度に1つの議席数または基準だけを変更します。' },
|
|
18
|
+
] };
|
|
19
|
+
export const content: CoalitionMajorityLocaleContent = { slug: 'coalition-majority-calculator', title: '連合過半数計算機', description: '指定した過半数基準の下で議席連合を調べ、最小勝利連合、余剰、決定的な政党を見つけます。', ui, seo: [
|
|
20
|
+
{ type: 'title', text: '過半数に届く議席の組み合わせ', level: 2 }, { type: 'paragraph', html: '連合のメンバーが持つ議席の合計が、指定した基準以上なら勝利です。この計算機は空でない組み合わせをすべて列挙し、基準をどれだけ上回るかを示します。' }, { type: 'title', text: '最小勝利連合と余剰のある連合', level: 2 }, { type: 'paragraph', html: '最小勝利連合は、どのメンバーが抜けても過半数を失います。余剰のある連合は、1つ以上のメンバーが抜けても基準を上回ります。これは議席の構造であり、政治的安定性の予測ではありません。' }, { type: 'table', headers: ['結果', '判定', 'わかること'], rows: [['勝利連合', '議席が基準以上。', '原理上勝利できるグループ。'], ['最小勝利連合', '全メンバーが必要。', '議席の算術的な余剰がないグループ。'], ['余剰のある連合', 'メンバーが抜けても勝利。', '冗長なパートナーを含む過半数。']] }, { type: 'title', text: '決定的な政党を議席の算術として読む', level: 2 }, { type: 'paragraph', html: '決定的な回数は、バンザフ型の離脱テストで数えます。政党の離脱によって勝利連合が敗北に変わると、その政党を1回数えます。割合はすべての決定的な離脱で正規化します。' }, { type: 'list', items: ['総議席と、使いたいルールの基準から始めます。', '2つの議席配分を比較するときは同じ基準を保ちます。', '決定的な一覧を読む前に、表で冗長なメンバーを確認します。', '感度を調べるときは一度に1政党だけ変えます。', '重複名や議席ゼロは政治的な結論ではなくデータの問題として扱います。'] }, { type: 'title', text: '上限のある厳密な探索', level: 2 }, { type: 'paragraph', html: 'N政党では、2のN乗から1を引いた空でない連合を評価します。20政党という上限により、全探索をブラウザーで透明かつ実用的に行えます。表は読みやすい部分を示し、集計は全探索を対象にします。' }, { type: 'tip', title: '基準は仮定であり法律ではありません', html: 'この計算機は国の制度、首班指名、信任協定、法的な過半数を判断しません。基準を自分で入力し、結果と一緒に記録してください。' }, { type: 'title', text: 'モデルから推測できないこと', level: 2 }, { type: 'paragraph', html: '議席の重みは数値を超える能力を示すだけで、協力する可能性を示しません。思想、政策距離、交渉、正統性、安定性、外部支援は評価しません。' }, { type: 'tip', title: '結果を監査の道筋として使う', html: '決定的と表示された政党について、その離脱で基準を下回る勝利連合を表から探してください。余剰のある連合では冗長なメンバーを確認します。' },
|
|
21
|
+
], faq: [{ question: '最小連合とは何ですか?', answer: 'どのメンバーが抜けても連合が敗北する状態です。1つのメンバーが抜けても基準に届くなら余剰があります。' }, { question: '決定的とは何ですか?', answer: 'その政党なしでは勝利連合が敗北になる場合に決定的です。割合は重要な回数を全体で割ったものです。' }, { question: '実際の政権を予測しますか?', answer: 'いいえ。議席の算術だけを評価します。政治的な相性、交渉、憲法上の規則は対象外です。' }, { question: 'なぜ20政党までですか?', answer: '2のN乗から1を引いた組み合わせを調べるためです。20政党では1,048,575通りになります。' }], bibliography, howTo: [{ name: '政党を入力', text: '議席と区別できる名前を各政党に入力します。' }, { name: '基準を設定', text: '勝利に必要な議席数を指定します。' }, { name: '決定的な政党を確認', text: '輪と回数で必要な政党を見つけます。' }, { name: '表を読む', text: '最小連合、余剰、冗長なメンバーを比較します。' }, { name: '仮定を1つ変える', text: '議席数または基準を一度に1つ調整します。' }], schemas: [softwareApplication, faqPage, howTo] as unknown as Record<string, unknown>[] };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
|
|
2
|
+
import { bibliography } from '../bibliography';
|
|
3
|
+
import type { CoalitionMajorityLocaleContent } from '../entry';
|
|
4
|
+
import type { CoalitionMajorityUI } from '../ui';
|
|
5
|
+
|
|
6
|
+
const ui: CoalitionMajorityUI = {
|
|
7
|
+
addParty: '정당 추가', allCoalitions: '모든 승리 연합', calculate: '연합 계산', chamberSeats: '총 의석', coalitionSceneLabel: '연합 구성', criticalDefections: '결정적 이탈', emptyState: '두 개 이상의 정당을 추가하고 의석 수를 입력하세요.', explanation: '이 모델은 등록한 모든 정당이 어떤 조합에도 참여할 수 있다고 가정합니다. 정치적 호환성이 아니라 의석 산술을 측정합니다.', edgeCasesText: '빈 이름이나 중복 이름은 고유하게 바뀝니다. 의석이 0인 정당은 결정적일 수 없습니다. 20개를 넘는 정당에서는 정확한 탐색을 중단합니다.', edgeCasesTitle: '경계 사례와 경고', filterCoalitions: '표시', maximumParties: '전체 열거는 2의 N제곱으로 늘어나므로 최대 20개 정당까지 지원합니다.', majorityThreshold: '과반 기준', methodTitle: '적용 모델', methodText: '비어 있지 않은 모든 부분집합을 확인합니다. 연합은 지정한 기준 이상이면 승리합니다. 이탈로 승리 연합이 패배하면 해당 정당을 결정적으로 셉니다.', minimalCoalition: '최소 승리 연합', noMatchingCoalitions: '이 필터와 일치하는 연합이 없습니다.', noPivots: '이 기준에서는 결정적인 정당이 없습니다.', none: '없음', notDoText: '이 도구는 이념, 정책 호환성, 협상, 정당성, 안정성 또는 실제 정부 구성 가능성을 평가하지 않습니다.', notDoTitle: '이 도구가 하지 않는 일', partyName: '정당 이름', partySeats: '의석', partyTable: '연합 세부 정보', pivotal: '결정적', pivotalParty: '결정적 정당', redundantMembers: '불필요한 구성원', removeParty: '정당 삭제', reset: '예시 초기화', resultTitle: '연합 지도', seats: '의석', surplus: '초과분', surplusCoalition: '초과 의석 연합', threshold: '기준', thresholdHint: '연합의 의석이 이 기준 이상이면 승리합니다.', totalCoalitions: '가능한 비공집합 연합', winningCoalitions: '승리 연합',
|
|
8
|
+
};
|
|
9
|
+
const softwareApplication: SoftwareApplication = { '@type': 'SoftwareApplication', name: '연합 과반 계산기', applicationCategory: 'EducationalApplication', operatingSystem: 'Any', description: '지정한 기준 아래에서 의석 연합, 최소 승리 연합, 결정적 정당을 열거합니다.', url: 'https://gamebob.dev/ko/coalition-majority-calculator', offers: { '@type': 'Offer', price: '0', priceCurrency: 'KRW' } };
|
|
10
|
+
const faqPage: FAQPage = { '@type': 'FAQPage', mainEntity: [
|
|
11
|
+
{ '@type': 'Question', name: '최소 연합이란 무엇인가요?', acceptedAnswer: { '@type': 'Answer', text: '구성원 누구라도 빠지면 지정한 의석 기준 아래로 내려가는 연합입니다. 초과 의석 연합은 한 명 이상 빠져도 승리합니다.' } },
|
|
12
|
+
{ '@type': 'Question', name: '결정적이라는 뜻은 무엇인가요?', acceptedAnswer: { '@type': 'Answer', text: '해당 정당이 빠졌을 때 특정 승리 연합이 패배로 바뀌면 결정적으로 셉니다. 비율은 모든 결정적 이탈 중 해당 횟수입니다.' } },
|
|
13
|
+
{ '@type': 'Question', name: '실제 정부를 예측하나요?', acceptedAnswer: { '@type': 'Answer', text: '아니요. 입력한 의석과 기준의 산술만 평가합니다. 이념, 협상, 소수파 지지와 헌법 규칙은 모델 밖에 있습니다.' } },
|
|
14
|
+
{ '@type': 'Question', name: '왜 20개 정당으로 제한하나요?', acceptedAnswer: { '@type': 'Answer', text: '모든 비공집합 부분집합을 확인하기 때문입니다. 20개 정당이면 이미 1,048,575개 조합이 생겨 브라우저에서 다루기 좋은 한계입니다.' } },
|
|
15
|
+
] };
|
|
16
|
+
const howTo: HowTo = { '@type': 'HowTo', name: '가중 과반 연합 살펴보기', step: [
|
|
17
|
+
{ '@type': 'HowToStep', name: '정당 입력', text: '각 정당과 의석 가중치를 입력합니다. 이름을 구분하면 결과를 확인하기 쉽습니다.' }, { '@type': 'HowToStep', name: '기준 설정', text: '연합이 승리하는 데 필요한 의석 수를 입력합니다.' }, { '@type': 'HowToStep', name: '구성 확인', text: '강조된 고리와 결정적 횟수를 의석 수와 비교합니다.' }, { '@type': 'HowToStep', name: '표 읽기', text: '최소 승리 연합, 초과분, 불필요한 구성원을 비교합니다.' }, { '@type': 'HowToStep', name: '다른 시나리오 시험', text: '한 번에 의석 수 하나 또는 기준 하나만 바꿉니다.' },
|
|
18
|
+
] };
|
|
19
|
+
export const content: CoalitionMajorityLocaleContent = { slug: 'coalition-majority-calculator', title: '연합 과반 계산기', description: '지정한 과반 기준에서 모든 의석 연합을 살펴보고 최소 승리 연합과 결정적 정당을 찾습니다.', ui, seo: [
|
|
20
|
+
{ type: 'title', text: '과반에 도달할 수 있는 의석 조합', level: 2 }, { type: 'paragraph', html: '구성원이 가진 의석 합계가 지정한 기준 이상이면 연합이 승리합니다. 이 계산기는 비어 있지 않은 모든 조합을 나열하고 기준을 얼마나 초과하는지 보여 주므로 승리 이유를 확인할 수 있습니다.' }, { type: 'title', text: '최소 승리 연합과 초과 의석 연합', level: 2 }, { type: 'paragraph', html: '최소 승리 연합은 구성원 한 명이라도 빠지면 과반을 잃습니다. 초과 의석 연합은 한 명 이상 빠져도 기준을 넘습니다. 이는 의석 구조에 대한 설명이지 정치적 안정성의 예측이 아닙니다.' }, { type: 'table', headers: ['결과', '판정', '알 수 있는 것'], rows: [['승리 연합', '의석이 기준 이상.', '원칙적으로 충분한 의석을 가진 그룹.'], ['최소 승리 연합', '모든 구성원이 필요.', '의석 산술상 초과분이 없는 그룹.'], ['초과 의석 연합', '구성원이 빠져도 계속 승리.', '불필요한 파트너가 있는 과반.']] }, { type: 'title', text: '결정적 정당을 의석 산술로 읽기', level: 2 }, { type: 'paragraph', html: '결정적 횟수는 반자프 방식의 중요 이탈 검사를 사용합니다. 정당이 빠져 승리 연합이 패배로 바뀌면 한 번으로 셉니다. 비율은 해당 시나리오의 모든 결정적 이탈을 기준으로 정규화합니다.' }, { type: 'list', items: ['총 의석과 적용하려는 규칙의 기준에서 시작합니다.', '두 의석 분포를 비교할 때 기준을 동일하게 유지합니다.', '결정적 목록을 해석하기 전에 표에서 불필요한 구성원을 확인합니다.', '민감도를 볼 때는 한 번에 한 정당만 바꿉니다.', '중복 이름과 의석이 없는 정당은 정치적 결론이 아니라 데이터 문제로 봅니다.'] }, { type: 'title', text: '제한된 정확한 탐색', level: 2 }, { type: 'paragraph', html: 'N개 정당에서는 2의 N제곱에서 1을 뺀 비공집합 연합을 평가합니다. 20개 제한은 전체 탐색을 브라우저에서 투명하고 사용 가능하게 유지합니다. 표는 읽기 쉬운 부분을 보여 주고 요약은 전체 탐색을 반영합니다.' }, { type: 'tip', title: '기준은 가정이지 법률이 아닙니다', html: '계산기는 국가 규칙, 정부 승인, 신임 협정 또는 법적 과반을 판정하지 않습니다. 기준을 직접 입력하고 결과와 함께 기록하세요.' }, { type: 'title', text: '모델이 추론할 수 없는 것', level: 2 }, { type: 'paragraph', html: '의석 가중치는 숫자를 넘는 능력을 나타낼 뿐 협력 가능성을 나타내지 않습니다. 이념, 정책 거리, 협상, 정당성, 안정성, 외부 지지는 평가하지 않습니다.' }, { type: 'tip', title: '결과를 감사 기록으로 사용하세요', html: '결정적으로 표시된 정당은 빠졌을 때 기준 아래로 내려가는 승리 연합을 표에서 찾아보세요. 초과 의석 연합에서는 불필요한 구성원을 확인하세요.' },
|
|
21
|
+
], faq: [{ question: '최소 연합이란 무엇인가요?', answer: '구성원 누구라도 빠지면 연합이 패배하는 상태입니다. 한 명이 빠져도 기준에 도달하면 초과분이 있는 연합입니다.' }, { question: '결정적이라는 뜻은 무엇인가요?', answer: '그 정당이 없으면 승리 연합이 패배로 바뀌는 경우 결정적입니다. 비율은 결정적 횟수를 전체 횟수로 나눈 값입니다.' }, { question: '실제 정부를 예측하나요?', answer: '아니요. 의석 산술만 평가합니다. 정치적 호환성, 협상, 헌법 규칙은 모델 밖에 있습니다.' }, { question: '왜 20개 정당인가요?', answer: '2의 N제곱에서 1을 뺀 조합을 확인하기 때문입니다. 20개면 1,048,575개입니다.' }], bibliography, howTo: [{ name: '정당 입력', text: '각 정당에 의석과 구분되는 이름을 입력합니다.' }, { name: '기준 설정', text: '승리에 필요한 의석 수를 지정합니다.' }, { name: '결정적 정당 확인', text: '고리와 횟수로 필요한 정당을 찾습니다.' }, { name: '표 읽기', text: '최소 그룹, 초과분, 불필요한 구성원을 비교합니다.' }, { name: '가정 하나 바꾸기', text: '의석 수 또는 기준을 한 번에 하나씩 조정합니다.' }], schemas: [softwareApplication, faqPage, howTo] as unknown as Record<string, unknown>[] };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
|
|
2
|
+
import { bibliography } from '../bibliography';
|
|
3
|
+
import type { CoalitionMajorityLocaleContent } from '../entry';
|
|
4
|
+
import type { CoalitionMajorityUI } from '../ui';
|
|
5
|
+
|
|
6
|
+
const ui: CoalitionMajorityUI = {
|
|
7
|
+
addParty: 'Partij toevoegen', allCoalitions: 'Alle winnende coalities', calculate: 'Coalities berekenen', chamberSeats: 'Totaal aantal zetels', coalitionSceneLabel: 'Coalitieconstellatie', criticalDefections: 'Kritieke uitstappen', emptyState: 'Voeg minstens twee partijen toe en vul hun zetels in.', explanation: 'Dit model gaat ervan uit dat elke partij aan elke combinatie kan deelnemen. Het meet zetelaritmetiek, geen politieke verenigbaarheid.', edgeCasesText: 'Lege of dubbele namen worden uniek gemaakt. Een partij met nul zetels kan nooit doorslaggevend zijn. Boven 20 partijen stopt de exacte zoekopdracht.', edgeCasesTitle: 'Randgevallen en waarschuwingen', filterCoalitions: 'Tonen', maximumParties: 'Maximaal 20 partijen omdat volledige opsomming groeit als 2 tot de macht N.', majorityThreshold: 'Meerderheidsdrempel', methodTitle: 'Toegepast model', methodText: 'Elke niet-lege deelverzameling wordt gecontroleerd. Een coalitie wint vanaf de opgegeven drempel. Een partij is doorslaggevend als haar vertrek een winnende coalitie laat verliezen.', minimalCoalition: 'Minimale winnende coalitie', noMatchingCoalitions: 'Geen coalities passen bij dit filter.', noPivots: 'Geen partij is doorslaggevend bij deze drempel.', none: 'Geen', notDoText: 'De tool beoordeelt geen ideologie, politieke verenigbaarheid, onderhandelingen, legitimiteit, stabiliteit of de kans dat een regering wordt gevormd.', notDoTitle: 'Wat deze tool niet doet', partyName: 'Partijnaam', partySeats: 'Zetels', partyTable: 'Coalitiegegevens', pivotal: 'doorslaggevend', pivotalParty: 'Doorslaggevende partij', redundantMembers: 'Overbodige leden', removeParty: 'Partij verwijderen', reset: 'Voorbeeld herstellen', resultTitle: 'Coalitiekaart', seats: 'zetels', surplus: 'overschot', surplusCoalition: 'Coalitie met overschot', threshold: 'Drempel', thresholdHint: 'Een coalitie wint wanneer haar zetels deze drempel bereiken of overschrijden.', totalCoalitions: 'Mogelijke niet-lege coalities', winningCoalitions: 'Winnende coalities',
|
|
8
|
+
};
|
|
9
|
+
const softwareApplication: SoftwareApplication = { '@type': 'SoftwareApplication', name: 'Coalitiemeerderheid rekenmachine', applicationCategory: 'EducationalApplication', operatingSystem: 'Any', description: 'Som zetelgewogen coalities, minimale winnende groepen en doorslaggevende partijen op onder een gekozen drempel.', url: 'https://gamebob.dev/nl/coalitie-meerderheid-rekenmachine', offers: { '@type': 'Offer', price: '0', priceCurrency: 'EUR' } };
|
|
10
|
+
const faqPage: FAQPage = { '@type': 'FAQPage', mainEntity: [{ '@type': 'Question', name: 'Wanneer is een coalitie minimaal?', acceptedAnswer: { '@type': 'Answer', text: 'Wanneer het vertrek van elk afzonderlijk lid de coalitie onder de gekozen zeteldrempel brengt. Een coalitie met overschot blijft winnen nadat minstens één lid vertrekt.' } }, { '@type': 'Question', name: 'Wat betekent doorslaggevend?', acceptedAnswer: { '@type': 'Answer', text: 'Een partij telt als doorslaggevend wanneer haar vertrek een winnende coalitie in een verliezende coalitie verandert. Het aandeel wordt berekend over alle kritieke uitstappen.' } }, { '@type': 'Question', name: 'Voorspelt de rekenmachine een echte regering?', acceptedAnswer: { '@type': 'Answer', text: 'Nee. Alleen zetelgewichten en de gekozen drempel worden beoordeeld. Ideologie, onderhandelingen, minderheidssteun en constitutionele regels vallen buiten het model.' } }, { '@type': 'Question', name: 'Waarom maximaal 20 partijen?', acceptedAnswer: { '@type': 'Answer', text: 'De tool controleert elke niet-lege deelverzameling. Twintig partijen leveren al 1.048.575 combinaties op, een praktische browsergrens.' } }] };
|
|
11
|
+
const howTo: HowTo = { '@type': 'HowTo', name: 'Een gewogen meerderheid onderzoeken', step: [{ '@type': 'HowToStep', name: 'Voer partijen in', text: 'Voeg elke partij toe met haar zetelgewicht en gebruik onderscheidende namen.' }, { '@type': 'HowToStep', name: 'Stel de drempel in', text: 'Voer het aantal zetels in dat een coalitie moet bereiken.' }, { '@type': 'HowToStep', name: 'Bekijk de constellatie', text: 'Let op de accentcirkels en vergelijk doorslaggevende tellingen met zetels.' }, { '@type': 'HowToStep', name: 'Lees de tabel', text: 'Vergelijk minimale coalities, overschot en overbodige leden.' }, { '@type': 'HowToStep', name: 'Test een scenario', text: 'Verander telkens één zetelaantal of de drempel.' }] };
|
|
12
|
+
export const content: CoalitionMajorityLocaleContent = { slug: 'coalitie-meerderheid-rekenmachine', title: 'Coalitiemeerderheid rekenmachine', description: 'Onderzoek elke zetelcoalitie onder een gekozen meerderheidsdrempel en vind minimale winnaars, overschot en doorslaggevende partijen.', ui, seo: [{ type: 'title', text: 'Welke zetelcombinaties een meerderheid bereiken', level: 2 }, { type: 'paragraph', html: 'Een coalitie wint wanneer de zetels van haar leden de door jou gekozen drempel bereiken of overschrijden. Deze rekenmachine somt elke niet-lege combinatie op en toont het exacte overschot, zodat je kunt zien waarom een groep wint.' }, { type: 'title', text: 'Minimale en coalities met overschot', level: 2 }, { type: 'paragraph', html: 'Een minimale winnende coalitie verliest haar meerderheid zodra een lid vertrekt. Een coalitie met overschot blijft boven de drempel nadat een of meer leden vertrekken. Dit zegt iets over zetels, niet over politieke stabiliteit.' }, { type: 'table', headers: ['Resultaat', 'Test', 'Wat je ziet'], rows: [['Winnende coalitie', 'De zetels bereiken de drempel.', 'Groepen die in principe genoeg zetels hebben.'], ['Minimale winnende coalitie', 'Elk lid is noodzakelijk.', 'Groepen zonder rekenkundig overschot.'], ['Coalitie met overschot', 'Een lid kan vertrekken en de groep wint nog.', 'Meerderheden met overbodige partners.']] }, { type: 'title', text: 'Doorslaggevende partijen als zetelaritmetiek lezen', level: 2 }, { type: 'paragraph', html: 'De telling gebruikt een kritieke uitstaptest in Banzhaf-stijl. Een partij telt wanneer haar vertrek een winnende coalitie laat verliezen. Het aandeel wordt genormaliseerd over alle kritieke uitstappen.' }, { type: 'list', items: ['Begin met het totale aantal zetels en de drempel van je regel.', 'Houd de drempel gelijk wanneer je zetelverdelingen vergelijkt.', 'Bekijk overbodige leden in de tabel voordat je de doorslaggevende lijst duidt.', 'Verander voor een gevoeligheidstest telkens één partij.', 'Behandel dubbele namen en partijen zonder zetels als dataproblemen.'] }, { type: 'title', text: 'Een begrensde exacte zoekopdracht', level: 2 }, { type: 'paragraph', html: 'Voor N partijen beoordeelt de rekenmachine 2 tot de macht N min 1 niet-lege coalities. De grens van 20 houdt de volledige zoekopdracht begrijpelijk en bruikbaar in een browser. De tabel toont een leesbare selectie, terwijl de totalen de volledige zoekopdracht omvatten.' }, { type: 'tip', title: 'Drempels zijn aannames, geen wetten', html: 'De rekenmachine herkent geen nationale regel, investituur, vertrouwensakkoord of geldige parlementaire meerderheid. Voer de drempel zelf in en bewaar die regel naast het resultaat.' }, { type: 'title', text: 'Wat het model niet kan afleiden', level: 2 }, { type: 'paragraph', html: 'Zetelgewichten tonen het vermogen om een getal te overschrijden, niet de bereidheid om samen te werken. Het model beoordeelt geen ideologie, beleidsafstand, onderhandelingen, legitimiteit, stabiliteit of steun van buitenaf.' }, { type: 'tip', title: 'Gebruik het resultaat als auditspoor', html: 'Als een partij doorslaggevend is, zoek dan een winnende coalitie waarin haar vertrek de drempel doorbreekt. Bekijk bij een coalitie met overschot de overbodige leden.' }], faq: [{ question: 'Wanneer is een coalitie minimaal?', answer: 'Wanneer het vertrek van elk lid haar laat verliezen. Als minstens één lid kan vertrekken en de drempel blijft gehaald, is er overschot.' }, { question: 'Wat betekent doorslaggevend?', answer: 'Een partij is doorslaggevend in elke winnende coalitie die zonder haar verliest. Het aandeel is de kritieke telling gedeeld door het kritieke totaal.' }, { question: 'Voorspelt dit een echte regering?', answer: 'Nee. Alleen zetelaritmetiek wordt berekend. Politieke verenigbaarheid, onderhandelingen en constitutionele regels vallen erbuiten.' }, { question: 'Waarom 20 partijen?', answer: 'De exacte zoekopdracht controleert 2 tot de macht N min 1 combinaties. Bij 20 partijen zijn dat al 1.048.575.' }], bibliography, howTo: [{ name: 'Voer partijen in', text: 'Voeg partijen toe met zetels en onderscheidende namen.' }, { name: 'Stel de drempel in', text: 'Geef aan hoeveel zetels nodig zijn om te winnen.' }, { name: 'Controleer doorslaggevende partijen', text: 'Gebruik cirkels en tellingen om noodzakelijke partijen te vinden.' }, { name: 'Lees de tabel', text: 'Vergelijk minimale groepen, overschot en overbodige leden.' }, { name: 'Verander één aanname', text: 'Pas telkens één zetelaantal of de drempel aan.' }], schemas: [softwareApplication, faqPage, howTo] as unknown as Record<string, unknown>[] };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
|
|
2
|
+
import { bibliography } from '../bibliography';
|
|
3
|
+
import type { CoalitionMajorityLocaleContent } from '../entry';
|
|
4
|
+
import type { CoalitionMajorityUI } from '../ui';
|
|
5
|
+
|
|
6
|
+
const ui: CoalitionMajorityUI = {
|
|
7
|
+
addParty: 'Dodaj partię', allCoalitions: 'Wszystkie zwycięskie koalicje', calculate: 'Oblicz koalicje', chamberSeats: 'Łączna liczba mandatów', coalitionSceneLabel: 'Konstelacja koalicji', criticalDefections: 'Krytyczne odejścia', emptyState: 'Dodaj co najmniej dwie partie i wpisz ich mandaty.', explanation: 'Model zakłada, że każda partia może dołączyć do dowolnego połączenia. Mierzy arytmetykę mandatów, a nie zgodność polityczną.', edgeCasesText: 'Puste i powtarzające się nazwy są ujednoznaczniane. Partia bez mandatów nie może być rozstrzygająca. Powyżej 20 partii wyszukiwanie dokładne zostaje zatrzymane.', edgeCasesTitle: 'Przypadki brzegowe i ostrzeżenia', filterCoalitions: 'Pokaż', maximumParties: 'Maksymalnie 20 partii, ponieważ pełne wyliczenie rośnie jak 2 do potęgi N.', majorityThreshold: 'Próg większości', methodTitle: 'Zastosowany model', methodText: 'Sprawdzany jest każdy niepusty podzbiór. Koalicja wygrywa po osiągnięciu podanego progu. Partia jest rozstrzygająca, jeśli jej odejście powoduje przegraną zwycięskiej koalicji.', minimalCoalition: 'Minimalna koalicja zwycięska', noMatchingCoalitions: 'Żadna koalicja nie pasuje do tego filtra.', noPivots: 'Przy tym progu żadna partia nie jest rozstrzygająca.', none: 'Brak', notDoText: 'Narzędzie nie ocenia ideologii, zgodności programowej, negocjacji, legitymacji, stabilności ani prawdopodobieństwa powstania rządu.', notDoTitle: 'Czego to narzędzie nie robi', partyName: 'Nazwa partii', partySeats: 'Mandaty', partyTable: 'Szczegóły koalicji', pivotal: 'rozstrzygająca', pivotalParty: 'Partia rozstrzygająca', redundantMembers: 'Nadmiarowi członkowie', removeParty: 'Usuń partię', reset: 'Przywróć przykład', resultTitle: 'Mapa koalicji', seats: 'mandaty', surplus: 'nadwyżka', surplusCoalition: 'Koalicja z nadwyżką', threshold: 'Próg', thresholdHint: 'Koalicja wygrywa, gdy jej mandaty osiągną lub przekroczą ten próg.', totalCoalitions: 'Możliwe niepuste koalicje', winningCoalitions: 'Zwycięskie koalicje',
|
|
8
|
+
};
|
|
9
|
+
const softwareApplication: SoftwareApplication = { '@type': 'SoftwareApplication', name: 'Kalkulator większości koalicyjnej', applicationCategory: 'EducationalApplication', operatingSystem: 'Any', description: 'Wylicza koalicje ważone mandatami, minimalne grupy zwycięskie i partie rozstrzygające przy określonym progu.', url: 'https://gamebob.dev/pl/kalkulator-wiekszosci-koalicyjnej', offers: { '@type': 'Offer', price: '0', priceCurrency: 'PLN' } };
|
|
10
|
+
const faqPage: FAQPage = { '@type': 'FAQPage', mainEntity: [{ '@type': 'Question', name: 'Kiedy koalicja jest minimalna?', acceptedAnswer: { '@type': 'Answer', text: 'Jest minimalna, gdy odejście dowolnego członka sprowadza ją poniżej określonego progu mandatów. Koalicja z nadwyżką nadal wygrywa po odejściu co najmniej jednego członka.' } }, { '@type': 'Question', name: 'Co oznacza partia rozstrzygająca?', acceptedAnswer: { '@type': 'Answer', text: 'Partia jest liczona jako rozstrzygająca za każdym razem, gdy jej odejście zmienia zwycięską koalicję w przegrywającą. Udział odnosi się do wszystkich krytycznych odejść.' } }, { '@type': 'Question', name: 'Czy kalkulator przewiduje prawdziwy rząd?', acceptedAnswer: { '@type': 'Answer', text: 'Nie. Ocenia tylko podane wagi mandatów i próg. Ideologia, negocjacje, poparcie mniejszościowe i reguły konstytucyjne są poza modelem.' } }, { '@type': 'Question', name: 'Dlaczego limit wynosi 20 partii?', acceptedAnswer: { '@type': 'Answer', text: 'Narzędzie sprawdza każdy niepusty podzbiór. Dwadzieścia partii tworzy już 1 048 575 kombinacji, co jest praktyczną granicą przeglądarki.' } }] };
|
|
11
|
+
const howTo: HowTo = { '@type': 'HowTo', name: 'Zbadaj ważoną większość', step: [{ '@type': 'HowToStep', name: 'Wpisz partie', text: 'Dodaj każdą partię i wpisz jej liczbę mandatów. Rozróżniaj nazwy, aby ułatwić kontrolę.' }, { '@type': 'HowToStep', name: 'Ustaw próg', text: 'Wpisz liczbę mandatów potrzebną do zwycięstwa koalicji.' }, { '@type': 'HowToStep', name: 'Obejrzyj konstelację', text: 'Zwróć uwagę na pierścienie akcentu i porównaj liczniki rozstrzygające z mandatami.' }, { '@type': 'HowToStep', name: 'Przeczytaj tabelę', text: 'Porównaj koalicje minimalne, nadwyżkę i nadmiarowych członków.' }, { '@type': 'HowToStep', name: 'Przetestuj scenariusz', text: 'Za każdym razem zmień jedną liczbę mandatów albo próg.' }] };
|
|
12
|
+
export const content: CoalitionMajorityLocaleContent = { slug: 'kalkulator-wiekszosci-koalicyjnej', title: 'Kalkulator większości koalicyjnej', description: 'Zbadaj każdą koalicję mandatów przy określonym progu większości i znajdź grupy minimalne, nadwyżkę oraz partie rozstrzygające.', ui, seo: [{ type: 'title', text: 'Które kombinacje mandatów osiągają większość', level: 2 }, { type: 'paragraph', html: 'Koalicja wygrywa, gdy mandaty jej członków osiągają lub przekraczają wskazany próg. Kalkulator wylicza każdą niepustą kombinację i pokazuje dokładną nadwyżkę, dzięki czemu można sprawdzić przyczynę zwycięstwa.' }, { type: 'title', text: 'Minimalne koalicje zwycięskie i koalicje z nadwyżką', level: 2 }, { type: 'paragraph', html: 'Minimalna koalicja zwycięska traci większość po odejściu dowolnego członka. Koalicja z nadwyżką pozostaje powyżej progu po odejściu jednego lub kilku członków. To różnica arytmetyczna, a nie prognoza stabilności politycznej.' }, { type: 'table', headers: ['Wynik', 'Test', 'Co pokazuje'], rows: [['Koalicja zwycięska', 'Mandaty osiągają próg.', 'Grupy, które z założenia mają wystarczająco mandatów.'], ['Minimalna koalicja zwycięska', 'Każdy członek jest konieczny.', 'Grupy bez arytmetycznej nadwyżki.'], ['Koalicja z nadwyżką', 'Członek może odejść, a grupa nadal wygrywa.', 'Większości z nadmiarowymi partnerami.']] }, { type: 'title', text: 'Partie rozstrzygające jako arytmetyka mandatów', level: 2 }, { type: 'paragraph', html: 'Licznik rozstrzygający używa testu krytycznego odejścia w stylu Banzhafa. Partia jest liczona, gdy jej odejście zmienia koalicję zwycięską w przegrywającą. Udział jest normalizowany względem wszystkich krytycznych odejść.' }, { type: 'list', items: ['Zacznij od łącznej liczby mandatów i progu swojej reguły.', 'Zachowaj ten sam próg przy porównywaniu dwóch rozkładów mandatów.', 'Przed interpretacją listy sprawdź nadmiarowych członków w tabeli.', 'Zmieniaj jedną partię naraz podczas badania wrażliwości.', 'Traktuj powtórzone nazwy i partie bez mandatów jako problemy danych.'] }, { type: 'title', text: 'Ograniczone wyszukiwanie dokładne', level: 2 }, { type: 'paragraph', html: 'Dla N partii kalkulator ocenia 2 do potęgi N minus 1 niepustych koalicji. Limit 20 utrzymuje pełne wyszukiwanie przejrzystym i użytecznym w przeglądarce. Tabela pokazuje czytelny wycinek, a podsumowanie obejmuje całość.' }, { type: 'tip', title: 'Progi są założeniami, nie prawami', html: 'Kalkulator nie rozpoznaje przepisów państwowych, procedury powołania rządu, umowy zaufania ani prawnie obowiązującej większości. Wpisz próg samodzielnie i zachowaj go przy wyniku.' }, { type: 'title', text: 'Czego model nie może wywnioskować', level: 2 }, { type: 'paragraph', html: 'Wagi mandatów pokazują zdolność przekroczenia liczby, a nie gotowość do współpracy. Model nie ocenia ideologii, odległości programowej, negocjacji, legitymacji, stabilności ani poparcia zewnętrznego.' }, { type: 'tip', title: 'Użyj wyniku jako ścieżki audytu', html: 'Gdy partia jest rozstrzygająca, znajdź zwycięską koalicję, w której jej odejście przekracza próg w dół. W koalicji z nadwyżką sprawdź nadmiarowych członków.' }], faq: [{ question: 'Kiedy koalicja jest minimalna?', answer: 'Gdy odejście dowolnego członka powoduje przegraną. Jeśli jeden członek może odejść, a próg nadal jest osiągnięty, koalicja ma nadwyżkę.' }, { question: 'Co oznacza rozstrzygająca?', answer: 'Partia jest rozstrzygająca w każdej zwycięskiej koalicji, która bez niej przegrywa. Udział to licznik krytyczny podzielony przez sumę krytyczną.' }, { question: 'Czy przewiduje prawdziwy rząd?', answer: 'Nie. Oblicza tylko arytmetykę mandatów. Zgodność polityczna, negocjacje i reguły konstytucyjne są poza modelem.' }, { question: 'Dlaczego 20 partii?', answer: 'Wyszukiwanie dokładne sprawdza 2 do potęgi N minus 1 kombinacji. Dla 20 partii jest ich już 1 048 575.' }], bibliography, howTo: [{ name: 'Wpisz partie', text: 'Dodaj partie z mandatami i różnymi nazwami.' }, { name: 'Ustaw próg', text: 'Podaj liczbę mandatów potrzebną do zwycięstwa.' }, { name: 'Sprawdź partie rozstrzygające', text: 'Użyj pierścieni i liczników, aby znaleźć partie konieczne.' }, { name: 'Przeczytaj tabelę', text: 'Porównaj grupy minimalne, nadwyżkę i nadmiarowych członków.' }, { name: 'Zmień jedno założenie', text: 'Dostosuj jedną liczbę mandatów albo próg.' }], schemas: [softwareApplication, faqPage, howTo] as unknown as Record<string, unknown>[] };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
|
|
2
|
+
import { bibliography } from '../bibliography';
|
|
3
|
+
import type { CoalitionMajorityLocaleContent } from '../entry';
|
|
4
|
+
import type { CoalitionMajorityUI } from '../ui';
|
|
5
|
+
|
|
6
|
+
const ui: CoalitionMajorityUI = {
|
|
7
|
+
addParty: 'Adicionar partido', allCoalitions: 'Todas as coalizões vencedoras', calculate: 'Calcular coalizões', chamberSeats: 'Total de cadeiras', coalitionSceneLabel: 'Constelação de coalizões', criticalDefections: 'Saídas críticas', emptyState: 'Adicione pelo menos dois partidos e informe suas cadeiras.', explanation: 'O modelo supõe que cada partido pode entrar em qualquer combinação. Ele mede a aritmética das cadeiras, não a compatibilidade política.', edgeCasesText: 'Nomes vazios ou repetidos se tornam únicos. Partidos sem cadeiras nunca podem ser decisivos. Acima de 20 partidos, a busca exata é interrompida.', edgeCasesTitle: 'Casos extremos e avisos', filterCoalitions: 'Mostrar', maximumParties: 'Máximo de 20 partidos, pois a enumeração completa cresce como 2 elevado a N.', majorityThreshold: 'Limiar de maioria', methodTitle: 'Modelo aplicado', methodText: 'Cada subconjunto não vazio é verificado. Uma coalizão vence ao atingir o limiar informado. Um partido é decisivo quando sua saída faz uma coalizão vencedora perder.', minimalCoalition: 'Coalizão vencedora mínima', noMatchingCoalitions: 'Nenhuma coalizão corresponde a este filtro.', noPivots: 'Nenhum partido é decisivo com este limiar.', none: 'Nenhum', notDoText: 'A ferramenta não avalia ideologia, compatibilidade política, negociação, legitimidade, estabilidade ou a chance de um governo ser formado.', notDoTitle: 'O que esta ferramenta não faz', partyName: 'Nome do partido', partySeats: 'Cadeiras', partyTable: 'Detalhes da coalizão', pivotal: 'decisivo', pivotalParty: 'Partido decisivo', redundantMembers: 'Membros redundantes', removeParty: 'Remover partido', reset: 'Restaurar exemplo', resultTitle: 'Mapa de coalizões', seats: 'cadeiras', surplus: 'excedente', surplusCoalition: 'Coalizão com excedente', threshold: 'Limiar', thresholdHint: 'Uma coalizão vence quando suas cadeiras atingem ou ultrapassam este limiar.', totalCoalitions: 'Coalizões não vazias possíveis', winningCoalitions: 'Coalizões vencedoras',
|
|
8
|
+
};
|
|
9
|
+
const softwareApplication: SoftwareApplication = { '@type': 'SoftwareApplication', name: 'Calculadora de maioria de coalizões', applicationCategory: 'EducationalApplication', operatingSystem: 'Any', description: 'Enumera coalizões ponderadas por cadeiras, grupos vencedores mínimos e partidos decisivos sob um limiar declarado.', url: 'https://gamebob.dev/pt/calculadora-maioria-coalizoes', offers: { '@type': 'Offer', price: '0', priceCurrency: 'BRL' } };
|
|
10
|
+
const faqPage: FAQPage = { '@type': 'FAQPage', mainEntity: [{ '@type': 'Question', name: 'Quando uma coalizão é mínima?', acceptedAnswer: { '@type': 'Answer', text: 'Ela é mínima quando a saída de qualquer membro a coloca abaixo do limiar de cadeiras declarado. Uma coalizão com excedente continua vencendo após a saída de pelo menos um membro.' } }, { '@type': 'Question', name: 'O que significa decisivo?', acceptedAnswer: { '@type': 'Answer', text: 'Um partido é contado como decisivo sempre que sua saída transforma uma coalizão vencedora em perdedora. Sua participação é calculada sobre todas as saídas críticas.' } }, { '@type': 'Question', name: 'A calculadora prevê um governo real?', acceptedAnswer: { '@type': 'Answer', text: 'Não. Ela avalia apenas os pesos de cadeiras e o limiar informados. Ideologia, negociação, apoio minoritário e regras constitucionais ficam fora do modelo.' } }, { '@type': 'Question', name: 'Por que o limite é de 20 partidos?', acceptedAnswer: { '@type': 'Answer', text: 'A ferramenta verifica cada subconjunto não vazio. Vinte partidos já geram 1.048.575 combinações, um limite prático para o navegador.' } }] };
|
|
11
|
+
const howTo: HowTo = { '@type': 'HowTo', name: 'Explorar uma maioria ponderada', step: [{ '@type': 'HowToStep', name: 'Informe os partidos', text: 'Adicione cada partido e informe seu peso em cadeiras, usando nomes distintos.' }, { '@type': 'HowToStep', name: 'Defina o limiar', text: 'Informe quantas cadeiras uma coalizão precisa alcançar.' }, { '@type': 'HowToStep', name: 'Inspecione a constelação', text: 'Observe os anéis de destaque e compare as contagens decisivas com as cadeiras.' }, { '@type': 'HowToStep', name: 'Leia a tabela', text: 'Compare coalizões mínimas, excedente e membros redundantes.' }, { '@type': 'HowToStep', name: 'Teste outro cenário', text: 'Mude uma quantidade de cadeiras ou o limiar por vez.' }] };
|
|
12
|
+
export const content: CoalitionMajorityLocaleContent = { slug: 'calculadora-maioria-coalizoes', title: 'Calculadora de maioria de coalizões', description: 'Explore cada coalizão baseada em cadeiras sob um limiar declarado. Encontre grupos mínimos vencedores, excedente e partidos decisivos.', ui, seo: [{ type: 'title', text: 'Quais combinações de cadeiras alcançam a maioria', level: 2 }, { type: 'paragraph', html: 'Uma coalizão vence quando as cadeiras de seus membros alcançam ou ultrapassam o limiar que você declara. Esta calculadora enumera cada combinação não vazia e mostra o excedente exato, permitindo conferir por que um grupo vence.' }, { type: 'title', text: 'Coalizões mínimas e coalizões com excedente', level: 2 }, { type: 'paragraph', html: 'Uma coalizão vencedora mínima perde a maioria quando qualquer membro sai. Uma coalizão com excedente continua acima do limiar depois da saída de um ou mais membros. A distinção é aritmética, não uma previsão de estabilidade política.' }, { type: 'table', headers: ['Resultado', 'Teste aplicado', 'O que mostra'], rows: [['Coalizão vencedora', 'As cadeiras alcançam o limiar.', 'Quais grupos têm cadeiras suficientes em princípio.'], ['Coalizão vencedora mínima', 'Cada membro é necessário.', 'Quais grupos não têm excedente aritmético.'], ['Coalizão com excedente', 'Um membro pode sair e o grupo ainda vence.', 'Onde a maioria tem parceiros redundantes.']] }, { type: 'title', text: 'Ler partidos decisivos como aritmética de cadeiras', level: 2 }, { type: 'paragraph', html: 'A contagem decisiva usa um teste de saída crítica no estilo Banzhaf. Um partido conta quando sua saída transforma uma coalizão vencedora em perdedora. A participação é normalizada sobre todas as saídas críticas do cenário.' }, { type: 'list', items: ['Comece pelo total de cadeiras e pelo limiar da sua regra.', 'Mantenha o mesmo limiar ao comparar duas distribuições.', 'Confira os membros redundantes antes de interpretar a lista decisiva.', 'Mude um partido por vez ao explorar a sensibilidade.', 'Trate nomes repetidos e partidos sem cadeiras como problemas de dados.'] }, { type: 'title', text: 'Uma busca exata com limite', level: 2 }, { type: 'paragraph', html: 'Para N partidos, a calculadora avalia 2 elevado a N menos 1 coalizões não vazias. O limite de 20 mantém a busca completa transparente e utilizável no navegador. A tabela mostra uma seleção legível, enquanto os totais cobrem toda a busca.' }, { type: 'tip', title: 'Limiares são hipóteses, não leis', html: 'A calculadora não identifica regra nacional, investidura, acordo de confiança ou maioria parlamentar válida. Informe o limiar e guarde essa regra junto ao resultado.' }, { type: 'title', text: 'O que o modelo não pode inferir', level: 2 }, { type: 'paragraph', html: 'Pesos de cadeiras mostram a capacidade de ultrapassar um número, não a disposição para cooperar. O modelo não avalia ideologia, distância política, negociação, legitimidade, estabilidade ou apoio externo.' }, { type: 'tip', title: 'Use o resultado como trilha de auditoria', html: 'Quando um partido aparece como decisivo, encontre uma coalizão vencedora em que sua saída atravesse o limiar. Em uma coalizão com excedente, examine os membros redundantes.' }], faq: [{ question: 'Quando uma coalizão é mínima?', answer: 'Quando a saída de qualquer membro faz a coalizão perder. Se alguém pode sair e o limiar continua alcançado, há excedente.' }, { question: 'O que significa decisivo?', answer: 'Um partido é decisivo em cada coalizão vencedora que se torna perdedora sem ele. Sua participação é a contagem crítica dividida pelo total crítico.' }, { question: 'Prevê um governo real?', answer: 'Não. Avalia apenas a aritmética das cadeiras. Compatibilidade política, negociação e regras constitucionais ficam fora.' }, { question: 'Por que 20 partidos?', answer: 'A busca exata verifica 2 elevado a N menos 1 combinações. Com 20 partidos, já são 1.048.575.' }], bibliography, howTo: [{ name: 'Informe os partidos', text: 'Adicione cada partido com cadeiras e nome distinto.' }, { name: 'Defina o limiar', text: 'Indique quantas cadeiras são necessárias para vencer.' }, { name: 'Verifique os decisivos', text: 'Use anéis e contagens para encontrar partidos necessários.' }, { name: 'Leia a tabela', text: 'Compare grupos mínimos, excedente e membros redundantes.' }, { name: 'Mude uma hipótese', text: 'Ajuste uma quantidade de cadeiras ou o limiar por vez.' }], schemas: [softwareApplication, faqPage, howTo] as unknown as Record<string, unknown>[] };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
|
|
2
|
+
import { bibliography } from '../bibliography';
|
|
3
|
+
import type { CoalitionMajorityLocaleContent } from '../entry';
|
|
4
|
+
import type { CoalitionMajorityUI } from '../ui';
|
|
5
|
+
|
|
6
|
+
const ui: CoalitionMajorityUI = {
|
|
7
|
+
addParty: 'Добавить партию', allCoalitions: 'Все победившие коалиции', calculate: 'Рассчитать коалиции', chamberSeats: 'Всего мест', coalitionSceneLabel: 'Схема коалиций', criticalDefections: 'Критические выходы', emptyState: 'Добавьте как минимум две партии и укажите их число мест.', explanation: 'Модель предполагает, что каждая партия может войти в любую комбинацию. Она измеряет арифметику мест, а не политическую совместимость.', edgeCasesText: 'Пустые и повторяющиеся названия становятся уникальными. Партия без мест не может быть решающей. При числе партий больше 20 точный поиск останавливается.', edgeCasesTitle: 'Граничные случаи и предупреждения', filterCoalitions: 'Показать', maximumParties: 'Не более 20 партий, потому что полный перебор растёт как 2 в степени N.', majorityThreshold: 'Порог большинства', methodTitle: 'Применённая модель', methodText: 'Проверяется каждое непустое подмножество. Коалиция побеждает, достигнув указанного порога. Партия считается решающей, если её выход превращает победившую коалицию в проигравшую.', minimalCoalition: 'Минимальная победившая коалиция', noMatchingCoalitions: 'Нет коалиций, соответствующих этому фильтру.', noPivots: 'При таком пороге решающих партий нет.', none: 'Нет', notDoText: 'Инструмент не оценивает идеологию, совместимость программ, переговоры, легитимность, стабильность или вероятность формирования правительства.', notDoTitle: 'Чего этот инструмент не делает', partyName: 'Название партии', partySeats: 'Места', partyTable: 'Детали коалиции', pivotal: 'решающая', pivotalParty: 'Решающая партия', redundantMembers: 'Избыточные участники', removeParty: 'Удалить партию', reset: 'Восстановить пример', resultTitle: 'Карта коалиций', seats: 'места', surplus: 'избыток', surplusCoalition: 'Коалиция с избытком', threshold: 'Порог', thresholdHint: 'Коалиция побеждает, когда число её мест достигает или превышает этот порог.', totalCoalitions: 'Возможные непустые коалиции', winningCoalitions: 'Победившие коалиции',
|
|
8
|
+
};
|
|
9
|
+
const softwareApplication: SoftwareApplication = { '@type': 'SoftwareApplication', name: 'Калькулятор коалиционного большинства', applicationCategory: 'EducationalApplication', operatingSystem: 'Any', description: 'Перечисляет коалиции, взвешенные по местам, минимальные победившие группы и решающие партии при заданном пороге.', url: 'https://gamebob.dev/ru/kalkulyator-koalitsionnogo-bolshinstva', offers: { '@type': 'Offer', price: '0', priceCurrency: 'RUB' } };
|
|
10
|
+
const faqPage: FAQPage = { '@type': 'FAQPage', mainEntity: [{ '@type': 'Question', name: 'Когда коалиция является минимальной?', acceptedAnswer: { '@type': 'Answer', text: 'Она минимальна, если выход любого участника опускает её ниже заданного порога мест. Коалиция с избытком остаётся победившей после выхода хотя бы одного участника.' } }, { '@type': 'Question', name: 'Что значит решающая партия?', acceptedAnswer: { '@type': 'Answer', text: 'Партия считается решающей каждый раз, когда её выход превращает конкретную победившую коалицию в проигравшую. Её доля рассчитывается среди всех критических выходов.' } }, { '@type': 'Question', name: 'Предсказывает ли калькулятор настоящее правительство?', acceptedAnswer: { '@type': 'Answer', text: 'Нет. Он оценивает только введённые веса мест и порог. Идеология, переговоры, поддержка меньшинства и конституционные правила не входят в модель.' } }, { '@type': 'Question', name: 'Почему предел равен 20 партиям?', acceptedAnswer: { '@type': 'Answer', text: 'Инструмент проверяет каждое непустое подмножество. Двадцать партий дают уже 1 048 575 комбинаций, что является практическим пределом для браузера.' } }] };
|
|
11
|
+
const howTo: HowTo = { '@type': 'HowTo', name: 'Исследовать взвешенное большинство', step: [{ '@type': 'HowToStep', name: 'Введите партии', text: 'Добавьте партии и укажите их вес в местах, используя разные названия.' }, { '@type': 'HowToStep', name: 'Задайте порог', text: 'Введите число мест, которое коалиция должна набрать.' }, { '@type': 'HowToStep', name: 'Изучите схему', text: 'Найдите выделенные кольца и сравните решающие подсчёты с числом мест.' }, { '@type': 'HowToStep', name: 'Прочитайте таблицу', text: 'Сравните минимальные коалиции, избыток и избыточных участников.' }, { '@type': 'HowToStep', name: 'Проверьте сценарий', text: 'Меняйте за раз только одно число мест или порог.' }] };
|
|
12
|
+
export const content: CoalitionMajorityLocaleContent = { slug: 'kalkulyator-koalitsionnogo-bolshinstva', title: 'Калькулятор коалиционного большинства', description: 'Исследуйте все коалиции по числу мест при заданном пороге большинства, минимальные группы, избыток и решающие партии.', ui, seo: [{ type: 'title', text: 'Какие сочетания мест достигают большинства', level: 2 }, { type: 'paragraph', html: 'Коалиция побеждает, когда места её участников достигают или превышают заданный вами порог. Калькулятор перечисляет каждое непустое сочетание и показывает точный избыток, поэтому причину победы можно проверить.' }, { type: 'title', text: 'Минимальные победившие коалиции и избыток', level: 2 }, { type: 'paragraph', html: 'Минимальная победившая коалиция теряет большинство после выхода любого участника. Коалиция с избытком остаётся выше порога после выхода одного или нескольких участников. Это арифметическое различие, а не прогноз политической стабильности.' }, { type: 'table', headers: ['Результат', 'Проверка', 'Что видно'], rows: [['Победившая коалиция', 'Места достигают порога.', 'Группы, у которых в принципе достаточно мест.'], ['Минимальная победившая коалиция', 'Каждый участник необходим.', 'Группы без арифметического избытка.'], ['Коалиция с избытком', 'Участник может выйти, а группа всё ещё побеждает.', 'Большинство с избыточными партнёрами.']] }, { type: 'title', text: 'Решающие партии как арифметика мест', level: 2 }, { type: 'paragraph', html: 'Решающая величина использует проверку критического выхода в стиле Банцафа. Партия учитывается, когда её выход превращает победившую коалицию в проигравшую. Доля нормируется по всем критическим выходам сценария.' }, { type: 'list', items: ['Начните с общего числа мест и порога своей нормы.', 'Сохраняйте один порог при сравнении распределений мест.', 'Проверьте избыточных участников в таблице до интерпретации списка решающих партий.', 'Меняйте по одной партии, исследуя чувствительность.', 'Считайте повторяющиеся названия и партии без мест проблемами данных.'] }, { type: 'title', text: 'Ограниченный точный поиск', level: 2 }, { type: 'paragraph', html: 'Для N партий калькулятор оценивает 2 в степени N минус 1 непустых коалиций. Ограничение в 20 партий сохраняет полный поиск прозрачным и удобным в браузере. Таблица показывает читаемую выборку, а итоги охватывают весь поиск.' }, { type: 'tip', title: 'Пороги являются предположениями, а не законами', html: 'Калькулятор не определяет государственные правила, назначение правительства, соглашение о доверии или юридически значимое большинство. Введите порог самостоятельно и сохраните это правило рядом с результатом.' }, { type: 'title', text: 'Чего модель не может вывести', level: 2 }, { type: 'paragraph', html: 'Вес мест показывает способность перейти числовой порог, но не готовность сотрудничать. Модель не оценивает идеологию, политическую дистанцию, переговоры, легитимность, стабильность или внешнюю поддержку.' }, { type: 'tip', title: 'Используйте результат как след аудита', html: 'Если партия отмечена как решающая, найдите победившую коалицию, где её выход опускает результат ниже порога. В коалиции с избытком проверьте избыточных участников.' }], faq: [{ question: 'Когда коалиция минимальна?', answer: 'Когда выход любого участника приводит к поражению. Если один участник может выйти, а порог сохраняется, у коалиции есть избыток.' }, { question: 'Что значит решающая?', answer: 'Партия решающая в каждой победившей коалиции, которая без неё проигрывает. Доля равна критическому числу, делённому на общий критический счёт.' }, { question: 'Это предсказывает настоящее правительство?', answer: 'Нет. Оценивается только арифметика мест. Политическая совместимость, переговоры и конституционные нормы исключены.' }, { question: 'Почему максимум 20 партий?', answer: 'Точный поиск проверяет 2 в степени N минус 1 комбинаций. Для 20 партий это уже 1 048 575.' }], bibliography, howTo: [{ name: 'Введите партии', text: 'Добавьте партии с местами и разными названиями.' }, { name: 'Задайте порог', text: 'Укажите число мест, нужное для победы.' }, { name: 'Проверьте решающие партии', text: 'Используйте кольца и подсчёты, чтобы найти необходимые партии.' }, { name: 'Прочитайте таблицу', text: 'Сравните минимальные группы, избыток и избыточных участников.' }, { name: 'Измените одно предположение', text: 'Настройте одно число мест или порог.' }], schemas: [softwareApplication, faqPage, howTo] as unknown as Record<string, unknown>[] };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
|
|
2
|
+
import { bibliography } from '../bibliography';
|
|
3
|
+
import type { CoalitionMajorityLocaleContent } from '../entry';
|
|
4
|
+
import type { CoalitionMajorityUI } from '../ui';
|
|
5
|
+
|
|
6
|
+
const ui: CoalitionMajorityUI = {
|
|
7
|
+
addParty: 'Lägg till parti', allCoalitions: 'Alla vinnande koalitioner', calculate: 'Beräkna koalitioner', chamberSeats: 'Totalt antal mandat', coalitionSceneLabel: 'Koalitionskonstellation', criticalDefections: 'Kritiska avhopp', emptyState: 'Lägg till minst två partier och fyll i deras mandat.', explanation: 'Modellen antar att varje parti kan gå med i vilken kombination som helst. Den mäter mandatens aritmetik, inte politisk förenlighet.', edgeCasesText: 'Tomma och dubbla namn görs unika. Partier utan mandat kan aldrig vara avgörande. Över 20 partier stoppas den exakta sökningen.', edgeCasesTitle: 'Gränsfall och varningar', filterCoalitions: 'Visa', maximumParties: 'Högst 20 partier eftersom fullständig uppräkning växer som 2 upphöjt till N.', majorityThreshold: 'Majoritetströskel', methodTitle: 'Tillämpad modell', methodText: 'Varje icke-tom delmängd kontrolleras. En koalition vinner när den når den angivna tröskeln. Ett parti är avgörande om dess avhopp gör en vinnande koalition förlorande.', minimalCoalition: 'Minimal vinnande koalition', noMatchingCoalitions: 'Inga koalitioner matchar detta filter.', noPivots: 'Inget parti är avgörande vid denna tröskel.', none: 'Inga', notDoText: 'Verktyget bedömer inte ideologi, politisk förenlighet, förhandlingar, legitimitet, stabilitet eller sannolikheten att en regering bildas.', notDoTitle: 'Vad verktyget inte gör', partyName: 'Partinamn', partySeats: 'Mandat', partyTable: 'Koalitionsdetaljer', pivotal: 'avgörande', pivotalParty: 'Avgörande parti', redundantMembers: 'Överflödiga medlemmar', removeParty: 'Ta bort parti', reset: 'Återställ exempel', resultTitle: 'Koalitionskarta', seats: 'mandat', surplus: 'överskott', surplusCoalition: 'Koalition med överskott', threshold: 'Tröskel', thresholdHint: 'En koalition vinner när dess mandat når eller överstiger denna tröskel.', totalCoalitions: 'Möjliga icke-tomma koalitioner', winningCoalitions: 'Vinnande koalitioner',
|
|
8
|
+
};
|
|
9
|
+
const softwareApplication: SoftwareApplication = { '@type': 'SoftwareApplication', name: 'Kalkylator för koalitionsmajoritet', applicationCategory: 'EducationalApplication', operatingSystem: 'Any', description: 'Räkna upp mandatviktade koalitioner, minimala vinnande grupper och avgörande partier under en angiven tröskel.', url: 'https://gamebob.dev/sv/kalkylator-koalitionsmajoritet', offers: { '@type': 'Offer', price: '0', priceCurrency: 'SEK' } };
|
|
10
|
+
const faqPage: FAQPage = { '@type': 'FAQPage', mainEntity: [{ '@type': 'Question', name: 'När är en koalition minimal?', acceptedAnswer: { '@type': 'Answer', text: 'Den är minimal när varje medlems avhopp gör att koalitionen hamnar under den angivna mandatgränsen. En koalition med överskott vinner fortfarande efter att minst en medlem lämnat.' } }, { '@type': 'Question', name: 'Vad betyder avgörande?', acceptedAnswer: { '@type': 'Answer', text: 'Ett parti räknas som avgörande varje gång dess avhopp gör en vinnande koalition förlorande. Andelen räknas bland alla kritiska avhopp.' } }, { '@type': 'Question', name: 'Förutspår kalkylatorn en verklig regering?', acceptedAnswer: { '@type': 'Answer', text: 'Nej. Den bedömer bara angivna mandatvikter och en tröskel. Ideologi, förhandlingar, minoritetsstöd och konstitutionella regler ingår inte.' } }, { '@type': 'Question', name: 'Varför är gränsen 20 partier?', acceptedAnswer: { '@type': 'Answer', text: 'Verktyget kontrollerar varje icke-tom delmängd. Tjugo partier ger redan 1 048 575 kombinationer, en praktisk gräns för webbläsaren.' } }] };
|
|
11
|
+
const howTo: HowTo = { '@type': 'HowTo', name: 'Utforska en viktad majoritet', step: [{ '@type': 'HowToStep', name: 'Ange partierna', text: 'Lägg till varje parti och ange dess mandatvikt med tydliga namn.' }, { '@type': 'HowToStep', name: 'Ställ in tröskeln', text: 'Ange hur många mandat en koalition måste nå.' }, { '@type': 'HowToStep', name: 'Granska konstellationen', text: 'Leta efter accentcirklarna och jämför avgörande räkningar med mandaten.' }, { '@type': 'HowToStep', name: 'Läs tabellen', text: 'Jämför minimala koalitioner, överskott och överflödiga medlemmar.' }, { '@type': 'HowToStep', name: 'Testa ett scenario', text: 'Ändra ett mandatantal eller tröskeln i taget.' }] };
|
|
12
|
+
export const content: CoalitionMajorityLocaleContent = { slug: 'kalkylator-koalitionsmajoritet', title: 'Kalkylator för koalitionsmajoritet', description: 'Utforska varje mandatbaserad koalition under en angiven majoritetströskel och hitta minimala grupper, överskott och avgörande partier.', ui, seo: [{ type: 'title', text: 'Vilka mandatkombinationer når en majoritet', level: 2 }, { type: 'paragraph', html: 'En koalition vinner när medlemmarnas mandat når eller överstiger tröskeln du anger. Kalkylatorn räknar upp varje icke-tom kombination och visar det exakta överskottet, så du kan kontrollera varför gruppen vinner.' }, { type: 'title', text: 'Minimala vinnande koalitioner och överskott', level: 2 }, { type: 'paragraph', html: 'En minimal vinnande koalition förlorar majoriteten om någon medlem lämnar. En koalition med överskott ligger fortfarande över tröskeln efter att en eller flera medlemmar lämnat. Det är en strukturell mandatfråga, inte en prognos om politisk stabilitet.' }, { type: 'table', headers: ['Resultat', 'Test', 'Vad det visar'], rows: [['Vinnande koalition', 'Mandaten når tröskeln.', 'Grupper som i princip har tillräckligt många mandat.'], ['Minimal vinnande koalition', 'Varje medlem behövs.', 'Grupper utan aritmetiskt mandatöverskott.'], ['Koalition med överskott', 'En medlem kan lämna och gruppen vinner ändå.', 'Majoriteter med överflödiga partner.']] }, { type: 'title', text: 'Läs avgörande partier som mandatens aritmetik', level: 2 }, { type: 'paragraph', html: 'Den avgörande räkningen använder ett kritiskt avhoppstest i Banzhaf-stil. Ett parti räknas när dess avhopp gör en vinnande koalition förlorande. Andelen normaliseras över alla kritiska avhopp i scenariot.' }, { type: 'list', items: ['Börja med det totala antalet mandat och tröskeln i din regel.', 'Behåll samma tröskel när du jämför mandatfördelningar.', 'Kontrollera överflödiga medlemmar i tabellen före tolkningen.', 'Ändra ett parti i taget när du undersöker känslighet.', 'Se dubbla namn och partier utan mandat som dataproblem.'] }, { type: 'title', text: 'En begränsad exakt sökning', level: 2 }, { type: 'paragraph', html: 'För N partier utvärderar kalkylatorn 2 upphöjt till N minus 1 icke-tomma koalitioner. Gränsen på 20 håller den fullständiga sökningen tydlig och användbar i webbläsaren. Tabellen visar ett läsbart urval medan summeringen omfattar allt.' }, { type: 'tip', title: 'Trösklar är antaganden, inte lagar', html: 'Kalkylatorn identifierar ingen nationell regel, regeringsbildning, förtroendeuppgörelse eller giltig parlamentarisk majoritet. Ange tröskeln själv och spara regeln med resultatet.' }, { type: 'title', text: 'Vad modellen inte kan dra slutsats om', level: 2 }, { type: 'paragraph', html: 'Mandatvikter visar förmågan att passera ett tal, inte viljan att samarbeta. Modellen bedömer inte ideologi, politiskt avstånd, förhandlingar, legitimitet, stabilitet eller externt stöd.' }, { type: 'tip', title: 'Använd resultatet som en granskningskedja', html: 'När ett parti är avgörande, hitta en vinnande koalition där dess avhopp passerar tröskeln nedåt. I en koalition med överskott kan du granska de överflödiga medlemmarna.' }], faq: [{ question: 'När är en koalition minimal?', answer: 'När varje medlems avhopp gör att den förlorar. Om en medlem kan lämna och tröskeln ändå nås finns ett överskott.' }, { question: 'Vad betyder avgörande?', answer: 'Ett parti är avgörande i varje vinnande koalition som förlorar utan det. Andelen är den kritiska räkningen delad med det kritiska totalet.' }, { question: 'Förutspår detta en verklig regering?', answer: 'Nej. Bara mandatens aritmetik utvärderas. Politisk förenlighet, förhandlingar och konstitutionella regler ingår inte.' }, { question: 'Varför 20 partier?', answer: 'Den exakta sökningen kontrollerar 2 upphöjt till N minus 1 kombinationer. För 20 partier blir det redan 1 048 575.' }], bibliography, howTo: [{ name: 'Ange partierna', text: 'Lägg till partier med mandat och tydliga namn.' }, { name: 'Ställ in tröskeln', text: 'Ange hur många mandat som krävs för att vinna.' }, { name: 'Kontrollera avgörande partier', text: 'Använd cirklar och räkningar för att hitta nödvändiga partier.' }, { name: 'Läs tabellen', text: 'Jämför minimala grupper, överskott och överflödiga medlemmar.' }, { name: 'Ändra ett antagande', text: 'Justera ett mandatantal eller tröskeln i taget.' }], schemas: [softwareApplication, faqPage, howTo] as unknown as Record<string, unknown>[] };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
|
|
2
|
+
import { bibliography } from '../bibliography';
|
|
3
|
+
import type { CoalitionMajorityLocaleContent } from '../entry';
|
|
4
|
+
import type { CoalitionMajorityUI } from '../ui';
|
|
5
|
+
|
|
6
|
+
const ui: CoalitionMajorityUI = {
|
|
7
|
+
addParty: 'Parti ekle', allCoalitions: 'Tüm kazanan koalisyonlar', calculate: 'Koalisyonları hesapla', chamberSeats: 'Toplam sandalye', coalitionSceneLabel: 'Koalisyon görünümü', criticalDefections: 'Kritik ayrılmalar', emptyState: 'En az iki parti ekleyin ve sandalyelerini girin.', explanation: 'Model, listelenen her partinin her kombinasyona katılabileceğini varsayar. Siyasi uyumu değil, sandalye aritmetiğini ölçer.', edgeCasesText: 'Boş veya yinelenen adlar benzersiz yapılır. Sıfır sandalyeli partiler hiçbir zaman belirleyici olamaz. 20 partinin üzerinde kesin arama durdurulur.', edgeCasesTitle: 'Sınır durumları ve uyarılar', filterCoalitions: 'Göster', maximumParties: 'Tam tarama 2 üzeri N olarak büyüdüğü için en fazla 20 parti desteklenir.', majorityThreshold: 'Çoğunluk eşiği', methodTitle: 'Uygulanan model', methodText: 'Boş olmayan her alt küme kontrol edilir. Koalisyon, belirtilen eşiğe ulaştığında kazanır. Bir partinin ayrılması kazanan koalisyonu kaybettiriyorsa parti belirleyicidir.', minimalCoalition: 'Minimum kazanan koalisyon', noMatchingCoalitions: 'Bu filtreyle eşleşen koalisyon yok.', noPivots: 'Bu eşikte belirleyici parti yok.', none: 'Yok', notDoText: 'Araç ideolojiyi, siyasi uyumu, müzakereyi, meşruiyeti, istikrarı veya hükümet kurulma olasılığını değerlendirmez.', notDoTitle: 'Bu araç ne yapmaz', partyName: 'Parti adı', partySeats: 'Sandalye', partyTable: 'Koalisyon ayrıntıları', pivotal: 'belirleyici', pivotalParty: 'Belirleyici parti', redundantMembers: 'Gereksiz üyeler', removeParty: 'Partiyi kaldır', reset: 'Örneği sıfırla', resultTitle: 'Koalisyon haritası', seats: 'sandalye', surplus: 'fazla', surplusCoalition: 'Fazlalı koalisyon', threshold: 'Eşik', thresholdHint: 'Koalisyon, sandalye sayısı bu eşiğe ulaştığında veya aştığında kazanır.', totalCoalitions: 'Olası boş olmayan koalisyonlar', winningCoalitions: 'Kazanan koalisyonlar',
|
|
8
|
+
};
|
|
9
|
+
const softwareApplication: SoftwareApplication = { '@type': 'SoftwareApplication', name: 'Koalisyon çoğunluğu hesaplayıcısı', applicationCategory: 'EducationalApplication', operatingSystem: 'Any', description: 'Belirlenen eşik altında sandalye ağırlıklı koalisyonları, minimum kazanan grupları ve belirleyici partileri listeler.', url: 'https://gamebob.dev/tr/koalisyon-cogunluk-hesaplayici', offers: { '@type': 'Offer', price: '0', priceCurrency: 'TRY' } };
|
|
10
|
+
const faqPage: FAQPage = { '@type': 'FAQPage', mainEntity: [{ '@type': 'Question', name: 'Bir koalisyon ne zaman minimumdur?', acceptedAnswer: { '@type': 'Answer', text: 'Herhangi bir üyenin ayrılması koalisyonu belirtilen sandalye eşiğinin altına indiriyorsa minimumdur. Fazlalı bir koalisyon en az bir üye ayrıldıktan sonra da kazanır.' } }, { '@type': 'Question', name: 'Belirleyici ne demektir?', acceptedAnswer: { '@type': 'Answer', text: 'Bir partinin ayrılması belirli bir kazanan koalisyonu kaybedene çeviriyorsa parti belirleyici sayılır. Payı tüm kritik ayrılmalar üzerinden hesaplanır.' } }, { '@type': 'Question', name: 'Hesaplayıcı gerçek bir hükümeti tahmin eder mi?', acceptedAnswer: { '@type': 'Answer', text: 'Hayır. Yalnızca girilen sandalye ağırlıklarını ve eşiği değerlendirir. İdeoloji, müzakere, azınlık desteği ve anayasal kurallar modelin dışındadır.' } }, { '@type': 'Question', name: 'Neden 20 parti sınırı var?', acceptedAnswer: { '@type': 'Answer', text: 'Araç her boş olmayan alt kümeyi kontrol eder. Yirmi parti zaten 1.048.575 kombinasyon oluşturur ve bu tarayıcı için pratik bir sınırdır.' } }] };
|
|
11
|
+
const howTo: HowTo = { '@type': 'HowTo', name: 'Ağırlıklı çoğunluğu inceleme', step: [{ '@type': 'HowToStep', name: 'Partileri girin', text: 'Her partiyi ve sandalye ağırlığını farklı adlarla ekleyin.' }, { '@type': 'HowToStep', name: 'Eşiği belirleyin', text: 'Bir koalisyonun kazanması için gereken sandalye sayısını yazın.' }, { '@type': 'HowToStep', name: 'Görünümü inceleyin', text: 'Vurgulu halkaları bulun ve belirleyici sayıları sandalyelerle karşılaştırın.' }, { '@type': 'HowToStep', name: 'Tabloyu okuyun', text: 'Minimum koalisyonları, fazlayı ve gereksiz üyeleri karşılaştırın.' }, { '@type': 'HowToStep', name: 'Başka senaryo deneyin', text: 'Her seferinde tek bir sandalye sayısını veya eşiği değiştirin.' }] };
|
|
12
|
+
export const content: CoalitionMajorityLocaleContent = { slug: 'koalisyon-cogunluk-hesaplayici', title: 'Koalisyon çoğunluğu hesaplayıcısı', description: 'Belirlenen çoğunluk eşiğinde her sandalye koalisyonunu inceleyin; minimum kazanan grupları, fazlayı ve belirleyici partileri bulun.', ui, seo: [{ type: 'title', text: 'Hangi sandalye kombinasyonları çoğunluğa ulaşır', level: 2 }, { type: 'paragraph', html: 'Bir koalisyonun üyelerinin sandalyeleri belirlediğiniz eşiğe ulaştığında veya eşiği aştığında koalisyon kazanır. Bu hesaplayıcı her boş olmayan kombinasyonu listeler ve tam fazlayı gösterir; böylece kazanma nedeni kontrol edilebilir.' }, { type: 'title', text: 'Minimum kazanan koalisyonlar ve fazlalı koalisyonlar', level: 2 }, { type: 'paragraph', html: 'Minimum kazanan koalisyon, herhangi bir üye ayrıldığında çoğunluğunu kaybeder. Fazlalı koalisyon ise bir veya daha fazla üye ayrıldıktan sonra da eşik üzerinde kalır. Bu siyasi istikrar tahmini değil, sandalye yapısına dair bir ayrımdır.' }, { type: 'table', headers: ['Sonuç', 'Uygulanan test', 'Ne gösterir'], rows: [['Kazanan koalisyon', 'Sandalyeler eşiğe ulaşır.', 'İlke olarak yeterli sandalyeye sahip gruplar.'], ['Minimum kazanan koalisyon', 'Her üye gereklidir.', 'Aritmetik sandalye fazlası olmayan gruplar.'], ['Fazlalı koalisyon', 'Bir üye ayrılır ve grup yine kazanır.', 'Gereksiz ortakları olan çoğunluklar.']] }, { type: 'title', text: 'Belirleyici partileri sandalye aritmetiği olarak okuyun', level: 2 }, { type: 'paragraph', html: 'Belirleyici sayı, Banzhaf tarzı kritik ayrılma testi kullanır. Ayrılması kazanan koalisyonu kaybedene çeviren parti sayılır. Pay, senaryodaki tüm kritik ayrılmalara göre normalleştirilir.' }, { type: 'list', items: ['Toplam sandalye ve kuralınıza uygun eşikle başlayın.', 'İki dağılımı karşılaştırırken aynı eşiği koruyun.', 'Belirleyici listeyi yorumlamadan önce tabloda gereksiz üyeleri inceleyin.', 'Duyarlılığı araştırırken her seferinde tek parti değiştirin.', 'Yinelenen adları ve sandalyesiz partileri veri sorunu olarak görün.'] }, { type: 'title', text: 'Sınırlandırılmış kesin arama', level: 2 }, { type: 'paragraph', html: 'N parti için hesaplayıcı 2 üzeri N eksi 1 boş olmayan koalisyonu değerlendirir. 20 parti sınırı, tam taramayı tarayıcıda şeffaf ve kullanılabilir tutar. Tablo okunabilir bir bölüm gösterir, özet ise tüm taramayı kapsar.' }, { type: 'tip', title: 'Eşikler varsayımdır, yasa değildir', html: 'Hesaplayıcı ülke kuralını, hükümet onayını, güven anlaşmasını veya hukuken geçerli bir meclis çoğunluğunu belirlemez. Eşiği kendiniz girin ve bu kuralı sonuçla birlikte saklayın.' }, { type: 'title', text: 'Modelin çıkaramayacağı sonuçlar', level: 2 }, { type: 'paragraph', html: 'Sandalye ağırlıkları bir sayıyı aşma kapasitesini gösterir, iş birliği isteğini değil. Model ideolojiyi, politika mesafesini, müzakereleri, meşruiyeti, istikrarı veya dış desteği değerlendirmez.' }, { type: 'tip', title: 'Sonucu denetim izi olarak kullanın', html: 'Bir parti belirleyici görünüyorsa, ayrıldığında eşiğin altına inen kazanan koalisyonu bulun. Fazlalı koalisyonda gereksiz üyeleri inceleyin.' }], faq: [{ question: 'Koalisyon ne zaman minimumdur?', answer: 'Herhangi bir üyenin ayrılması koalisyonu kaybettiriyorsa minimumdur. Bir üye ayrıldığı halde eşik korunuyorsa koalisyonda fazla vardır.' }, { question: 'Belirleyici ne demektir?', answer: 'Parti, kendisi olmadan kaybeden her kazanan koalisyonda belirleyicidir. Payı kritik sayının toplam kritiğe bölünmesidir.' }, { question: 'Gerçek bir hükümeti tahmin eder mi?', answer: 'Hayır. Yalnızca sandalye aritmetiğini değerlendirir. Siyasi uyum, müzakere ve anayasal kurallar model dışındadır.' }, { question: 'Neden 20 parti?', answer: 'Kesin arama 2 üzeri N eksi 1 kombinasyonu kontrol eder. 20 partide sayı 1.048.575 olur.' }], bibliography, howTo: [{ name: 'Partileri girin', text: 'Sandalyeleri ve farklı adlarıyla partileri ekleyin.' }, { name: 'Eşiği belirleyin', text: 'Kazanmak için gereken sandalye sayısını yazın.' }, { name: 'Belirleyici partileri inceleyin', text: 'Gerekli partileri bulmak için halkaları ve sayıları kullanın.' }, { name: 'Tabloyu okuyun', text: 'Minimum grupları, fazlayı ve gereksiz üyeleri karşılaştırın.' }, { name: 'Tek varsayımı değiştirin', text: 'Her seferinde bir sandalye sayısını veya eşiği ayarlayın.' }], schemas: [softwareApplication, faqPage, howTo] as unknown as Record<string, unknown>[] };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
|
|
2
|
+
import { bibliography } from '../bibliography';
|
|
3
|
+
import type { CoalitionMajorityLocaleContent } from '../entry';
|
|
4
|
+
import type { CoalitionMajorityUI } from '../ui';
|
|
5
|
+
|
|
6
|
+
const ui: CoalitionMajorityUI = {
|
|
7
|
+
addParty: '添加政党', allCoalitions: '所有获胜联盟', calculate: '计算联盟', chamberSeats: '席位总数', coalitionSceneLabel: '联盟构图', criticalDefections: '关键退出次数', emptyState: '至少添加两个政党并输入席位数。', explanation: '模型假设每个政党都可以加入任意组合。它衡量的是席位算术,而不是政治兼容性。', edgeCasesText: '空名称或重复名称会被改为唯一名称。零席位政党永远不会成为关键成员。超过20个政党时会停止精确搜索。', edgeCasesTitle: '边界情况与警告', filterCoalitions: '显示', maximumParties: '最多支持20个政党,因为完整枚举会按2的N次方增长。', majorityThreshold: '多数门槛', methodTitle: '应用的模型', methodText: '检查每个非空子集。联盟达到设定门槛就算获胜。如果一个政党退出后获胜联盟变为失败,该政党就是关键成员。', minimalCoalition: '最小获胜联盟', noMatchingCoalitions: '没有符合此筛选条件的联盟。', noPivots: '在此门槛下没有关键政党。', none: '无', notDoText: '本工具不评估意识形态、政策兼容性、谈判、合法性、稳定性或政府实际成立的可能性。', notDoTitle: '本工具不做什么', partyName: '政党名称', partySeats: '席位', partyTable: '联盟详情', pivotal: '关键', pivotalParty: '关键政党', redundantMembers: '冗余成员', removeParty: '删除政党', reset: '重置示例', resultTitle: '联盟地图', seats: '席位', surplus: '余量', surplusCoalition: '有余量的联盟', threshold: '门槛', thresholdHint: '联盟席位达到或超过此门槛时获胜。', totalCoalitions: '可能的非空联盟', winningCoalitions: '获胜联盟',
|
|
8
|
+
};
|
|
9
|
+
const softwareApplication: SoftwareApplication = { '@type': 'SoftwareApplication', name: '联盟多数计算器', applicationCategory: 'EducationalApplication', operatingSystem: 'Any', description: '在指定门槛下列出按席位加权的联盟、最小获胜组合和关键政党。', url: 'https://gamebob.dev/zh/coalition-majority-calculator', offers: { '@type': 'Offer', price: '0', priceCurrency: 'CNY' } };
|
|
10
|
+
const faqPage: FAQPage = { '@type': 'FAQPage', mainEntity: [{ '@type': 'Question', name: '联盟什么时候是最小的?', acceptedAnswer: { '@type': 'Answer', text: '只要任意成员退出,联盟席位就低于设定门槛时,它就是最小联盟。有余量的联盟即使至少一名成员退出仍然获胜。' } }, { '@type': 'Question', name: '关键是什么意思?', acceptedAnswer: { '@type': 'Answer', text: '如果某政党退出会让一个获胜联盟变成失败联盟,就将它计为一次关键退出。其比例以全部关键退出为分母。' } }, { '@type': 'Question', name: '计算器会预测真实政府吗?', acceptedAnswer: { '@type': 'Answer', text: '不会。它只评估输入的席位权重和门槛。意识形态、谈判、少数支持和宪法规则不在模型范围内。' } }, { '@type': 'Question', name: '为什么限制为20个政党?', acceptedAnswer: { '@type': 'Answer', text: '工具需要检查每个非空子集。20个政党已经产生1,048,575种组合,这是浏览器中较实际的上限。' } }] };
|
|
11
|
+
const howTo: HowTo = { '@type': 'HowTo', name: '探索加权多数', step: [{ '@type': 'HowToStep', name: '输入政党', text: '添加每个政党并输入席位权重,使用容易区分的名称。' }, { '@type': 'HowToStep', name: '设置门槛', text: '输入联盟获胜所需的席位数。' }, { '@type': 'HowToStep', name: '查看构图', text: '寻找强调环,并将关键次数与席位数比较。' }, { '@type': 'HowToStep', name: '阅读表格', text: '比较最小获胜联盟、席位余量和冗余成员。' }, { '@type': 'HowToStep', name: '测试其他情景', text: '每次只改变一个席位数或门槛。' }] };
|
|
12
|
+
export const content: CoalitionMajorityLocaleContent = { slug: 'coalition-majority-calculator', title: '联盟多数计算器', description: '在指定多数门槛下探索每个席位联盟,找出最小获胜组合、席位余量和关键政党。', ui, seo: [{ type: 'title', text: '哪些席位组合可以达到多数', level: 2 }, { type: 'paragraph', html: '当联盟成员的席位总和达到或超过你设定的门槛时,联盟获胜。本计算器列出每个非空组合,并显示超过门槛的准确余量,帮助你检查获胜原因。' }, { type: 'title', text: '最小获胜联盟与有余量的联盟', level: 2 }, { type: 'paragraph', html: '最小获胜联盟在任意成员退出后都会失去多数。有余量的联盟在一个或多个成员退出后仍然超过门槛。这是席位结构的区别,不是政治稳定性的预测。' }, { type: 'table', headers: ['结果', '判定方式', '可以看出什么'], rows: [['获胜联盟', '席位达到门槛。', '原则上席位足够的组合。'], ['最小获胜联盟', '每个成员都不可缺少。', '没有席位算术余量的组合。'], ['有余量的联盟', '成员退出后仍然获胜。', '包含冗余伙伴的多数。']] }, { type: 'title', text: '把关键政党理解为席位算术', level: 2 }, { type: 'paragraph', html: '关键次数使用班扎夫式的关键退出检验。当政党退出会让获胜联盟变为失败联盟时,就计入一次。比例按照情景中的全部关键退出进行归一化。' }, { type: 'list', items: ['从总席位和适用规则的门槛开始。', '比较两种席位分配时保持同一门槛。', '解读关键政党列表前,先在表格中检查冗余成员。', '研究敏感性时一次只改变一个政党。', '把重复名称和无席位政党视为数据问题,而不是政治结论。'] }, { type: 'title', text: '有限的精确搜索', level: 2 }, { type: 'paragraph', html: '对于N个政党,计算器会评估2的N次方减1个非空联盟。20个政党的上限让完整搜索在浏览器中保持透明且可用。表格展示易读的部分,而汇总覆盖完整搜索。' }, { type: 'tip', title: '门槛是设定,不是法律', html: '计算器不会识别国家制度、组阁规则、信任协议或法律意义上的议会多数。请自行输入门槛,并把规则与结果一起保存。' }, { type: 'title', text: '模型无法推断什么', level: 2 }, { type: 'paragraph', html: '席位权重只表示跨过数字门槛的能力,并不表示合作意愿。模型不评估意识形态、政策距离、谈判、合法性、稳定性或外部支持。' }, { type: 'tip', title: '把结果作为审计线索', html: '如果某政党被标记为关键,请在表格中找到它退出后跌破门槛的获胜联盟。有余量的联盟则应检查冗余成员。' }], faq: [{ question: '联盟什么时候是最小的?', answer: '任意成员退出都会使联盟失败时,它就是最小联盟。如果有人退出后仍达到门槛,则联盟存在余量。' }, { question: '关键是什么意思?', answer: '某政党退出会让获胜联盟失败时,它就是关键政党。其比例是关键次数除以关键总数。' }, { question: '会预测真实政府吗?', answer: '不会。工具只评估席位算术。政治兼容性、谈判和宪法规则不在模型中。' }, { question: '为什么最多20个政党?', answer: '精确搜索要检查2的N次方减1个组合。20个政党已经有1,048,575种组合。' }], bibliography, howTo: [{ name: '输入政党', text: '添加带有席位和不同名称的政党。' }, { name: '设置门槛', text: '输入获胜所需的席位数。' }, { name: '检查关键政党', text: '使用环和次数找出必要的政党。' }, { name: '阅读表格', text: '比较最小组合、余量和冗余成员。' }, { name: '改变一个设定', text: '一次调整一个席位数或门槛。' }], schemas: [softwareApplication, faqPage, howTo] as unknown as Record<string, unknown>[] };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ToolDefinition } from '../../types';
|
|
2
|
+
import { coalitionMajorityCalculator } from './entry';
|
|
3
|
+
|
|
4
|
+
export * from './entry';
|
|
5
|
+
export * from './logic';
|
|
6
|
+
export const COALITION_MAJORITY_CALCULATOR_TOOL: ToolDefinition = {
|
|
7
|
+
entry: coalitionMajorityCalculator,
|
|
8
|
+
Component: () => import('./component.astro'),
|
|
9
|
+
SEOComponent: () => import('./seo.astro'),
|
|
10
|
+
BibliographyComponent: () => import('./bibliography.astro'),
|
|
11
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { describe, expect, it } from 'vitest';
|
|
2
|
+
import { analyzeCoalitions } from './logic';
|
|
3
|
+
|
|
4
|
+
describe('analyzeCoalitions', () => {
|
|
5
|
+
it('finds minimal winning coalitions and pivotal counts', () => {
|
|
6
|
+
const result = analyzeCoalitions([
|
|
7
|
+
{ name: 'A', seats: 1 },
|
|
8
|
+
{ name: 'B', seats: 2 },
|
|
9
|
+
{ name: 'C', seats: 3 },
|
|
10
|
+
], 4);
|
|
11
|
+
|
|
12
|
+
expect(result.valid).toBe(true);
|
|
13
|
+
expect(result.winningCoalitions).toBe(3);
|
|
14
|
+
expect(result.minimalWinningCoalitions).toBe(2);
|
|
15
|
+
expect(result.pivotCounts).toEqual({ A: 1, B: 1, C: 3 });
|
|
16
|
+
expect(result.pivotTotal).toBe(5);
|
|
17
|
+
expect(result.pivotShares.C).toBeCloseTo(0.6);
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
it('normalizes pivotal shares by the total number of critical defections', () => {
|
|
21
|
+
const result = analyzeCoalitions([
|
|
22
|
+
{ name: 'Cedar', seats: 38 },
|
|
23
|
+
{ name: 'River', seats: 27 },
|
|
24
|
+
{ name: 'North Star', seats: 19 },
|
|
25
|
+
{ name: 'Harbor', seats: 11 },
|
|
26
|
+
], 49);
|
|
27
|
+
|
|
28
|
+
expect(result.pivotCounts).toEqual({ Cedar: 6, River: 2, 'North Star': 2, Harbor: 2 });
|
|
29
|
+
expect(result.pivotTotal).toBe(12);
|
|
30
|
+
expect(result.pivotShares).toEqual({ Cedar: 0.5, River: 2 / 12, 'North Star': 2 / 12, Harbor: 2 / 12 });
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
it('handles ties, zero seats and exact thresholds', () => {
|
|
34
|
+
const result = analyzeCoalitions([
|
|
35
|
+
{ name: 'North', seats: 2 },
|
|
36
|
+
{ name: 'South', seats: 2 },
|
|
37
|
+
{ name: 'Zero', seats: 0 },
|
|
38
|
+
], 4);
|
|
39
|
+
|
|
40
|
+
expect(result.winningCoalitions).toBe(2);
|
|
41
|
+
expect(result.minimalWinningCoalitions).toBe(1);
|
|
42
|
+
expect(result.displayedCoalitions[0]?.members).toEqual(['North', 'South']);
|
|
43
|
+
expect(result.pivotCounts.Zero).toBe(0);
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
it('normalizes duplicate labels and warns when the threshold is unreachable', () => {
|
|
47
|
+
const result = analyzeCoalitions([{ name: 'Group', seats: 3 }, { name: 'Group', seats: 1 }], 8);
|
|
48
|
+
|
|
49
|
+
expect(result.parties.map((party) => party.name)).toEqual(['Group', 'Group 2']);
|
|
50
|
+
expect(result.winningCoalitions).toBe(0);
|
|
51
|
+
expect(result.warnings).toContain('The threshold is above the chamber total, so no coalition can win.');
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
it('rejects invalid input and the exhaustive search limit', () => {
|
|
55
|
+
expect(analyzeCoalitions([], 1).valid).toBe(false);
|
|
56
|
+
expect(analyzeCoalitions([{ name: 'A', seats: -1 }], 1).error).toMatch(/whole numbers/);
|
|
57
|
+
const parties = Array.from({ length: 21 }, (_, index) => ({ name: `P${index}`, seats: 1 }));
|
|
58
|
+
expect(analyzeCoalitions(parties, 2).error).toMatch(/at most 20/);
|
|
59
|
+
});
|
|
60
|
+
});
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
export interface PartyInput {
|
|
2
|
+
name: string;
|
|
3
|
+
seats: number;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export interface CoalitionRecord {
|
|
7
|
+
mask: number;
|
|
8
|
+
members: string[];
|
|
9
|
+
seats: number;
|
|
10
|
+
surplus: number;
|
|
11
|
+
minimal: boolean;
|
|
12
|
+
redundantMembers: string[];
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface CoalitionAnalysis {
|
|
16
|
+
valid: boolean;
|
|
17
|
+
error?: string;
|
|
18
|
+
parties: PartyInput[];
|
|
19
|
+
totalSeats: number;
|
|
20
|
+
threshold: number;
|
|
21
|
+
totalCoalitions: number;
|
|
22
|
+
winningCoalitions: number;
|
|
23
|
+
minimalWinningCoalitions: number;
|
|
24
|
+
pivotTotal: number;
|
|
25
|
+
displayedCoalitions: CoalitionRecord[];
|
|
26
|
+
pivotCounts: Record<string, number>;
|
|
27
|
+
pivotShares: Record<string, number>;
|
|
28
|
+
warnings: string[];
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
interface PreparedInput {
|
|
32
|
+
parties: PartyInput[];
|
|
33
|
+
threshold: number;
|
|
34
|
+
totalSeats: number;
|
|
35
|
+
warnings: string[];
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
interface EnumerationState {
|
|
39
|
+
winning: number;
|
|
40
|
+
minimal: number;
|
|
41
|
+
rows: CoalitionRecord[];
|
|
42
|
+
pivotCounts: Record<string, number>;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
interface CoalitionInspection {
|
|
46
|
+
record: CoalitionRecord;
|
|
47
|
+
criticalIndexes: number[];
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
const MAX_PARTIES = 20;
|
|
51
|
+
const DISPLAY_LIMIT = 120;
|
|
52
|
+
|
|
53
|
+
function normalizeName(name: string, index: number, seen: Map<string, number>): string {
|
|
54
|
+
const base = name.trim() || `Party ${index + 1}`;
|
|
55
|
+
const count = seen.get(base) ?? 0;
|
|
56
|
+
seen.set(base, count + 1);
|
|
57
|
+
return count === 0 ? base : `${base} ${count + 1}`;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
function prepareInput(inputs: PartyInput[], threshold: number): PreparedInput | string {
|
|
61
|
+
if (inputs.length === 0) return 'Add at least one party.';
|
|
62
|
+
if (inputs.length > MAX_PARTIES) return `The model supports at most ${MAX_PARTIES} parties.`;
|
|
63
|
+
const seen = new Map<string, number>();
|
|
64
|
+
const parties = inputs.map((party, index) => ({ name: normalizeName(party.name, index, seen), seats: party.seats }));
|
|
65
|
+
if (parties.some((party) => !Number.isSafeInteger(party.seats) || party.seats < 0)) return 'Seats must be whole numbers greater than or equal to zero.';
|
|
66
|
+
if (!Number.isSafeInteger(threshold) || threshold < 1) return 'The threshold must be a whole number above zero.';
|
|
67
|
+
const totalSeats = parties.reduce((sum, party) => sum + party.seats, 0);
|
|
68
|
+
const warnings = inputs.some((party, index) => party.name.trim() !== parties[index]?.name)
|
|
69
|
+
? ['Duplicate or blank names were made unique for the calculation.']
|
|
70
|
+
: [];
|
|
71
|
+
if (threshold > totalSeats) warnings.push('The threshold is above the chamber total, so no coalition can win.');
|
|
72
|
+
return { parties, threshold, totalSeats, warnings };
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
function buildSeatTotals(parties: PartyInput[]): Float64Array {
|
|
76
|
+
const totals = new Float64Array(2 ** parties.length);
|
|
77
|
+
for (let mask = 1; mask < totals.length; mask += 1) {
|
|
78
|
+
const bit = mask & -mask;
|
|
79
|
+
const index = Math.log2(bit);
|
|
80
|
+
totals[mask] = (totals[mask ^ bit] ?? 0) + (parties[index]?.seats ?? 0);
|
|
81
|
+
}
|
|
82
|
+
return totals;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
function inspectCoalition(mask: number, parties: PartyInput[], seats: number, threshold: number): CoalitionInspection {
|
|
86
|
+
const members: string[] = [];
|
|
87
|
+
const memberIndexes: number[] = [];
|
|
88
|
+
const criticalIndexes: number[] = [];
|
|
89
|
+
for (let index = 0; index < parties.length; index += 1) {
|
|
90
|
+
if ((mask & (1 << index)) === 0) continue;
|
|
91
|
+
memberIndexes.push(index);
|
|
92
|
+
members.push(parties[index]?.name ?? '');
|
|
93
|
+
if (seats - (parties[index]?.seats ?? 0) < threshold) criticalIndexes.push(index);
|
|
94
|
+
}
|
|
95
|
+
const criticalSet = new Set(criticalIndexes);
|
|
96
|
+
return {
|
|
97
|
+
record: { mask, members, seats, surplus: seats - threshold, minimal: criticalIndexes.length === members.length, redundantMembers: memberIndexes.filter((index) => !criticalSet.has(index)).map((index) => parties[index]?.name ?? '') },
|
|
98
|
+
criticalIndexes,
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
function createState(parties: PartyInput[]): EnumerationState {
|
|
103
|
+
return { winning: 0, minimal: 0, rows: [], pivotCounts: Object.fromEntries(parties.map((party) => [party.name, 0])) };
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
function addRow(rows: CoalitionRecord[], record: CoalitionRecord): void {
|
|
107
|
+
if (rows.length < DISPLAY_LIMIT) rows.push(record);
|
|
108
|
+
else if (record.minimal && rows.some((row) => !row.minimal)) {
|
|
109
|
+
const index = rows.findIndex((row) => !row.minimal);
|
|
110
|
+
if (index >= 0) rows[index] = record;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
function enumerate(parties: PartyInput[], threshold: number, totals: Float64Array): EnumerationState {
|
|
115
|
+
const state = createState(parties);
|
|
116
|
+
for (let mask = 1; mask < totals.length; mask += 1) {
|
|
117
|
+
const seats = totals[mask] ?? 0;
|
|
118
|
+
if (seats < threshold) continue;
|
|
119
|
+
const inspection = inspectCoalition(mask, parties, seats, threshold);
|
|
120
|
+
state.winning += 1;
|
|
121
|
+
if (inspection.record.minimal) state.minimal += 1;
|
|
122
|
+
inspection.criticalIndexes.forEach((index) => {
|
|
123
|
+
const name = parties[index]?.name;
|
|
124
|
+
if (name) state.pivotCounts[name] = (state.pivotCounts[name] ?? 0) + 1;
|
|
125
|
+
});
|
|
126
|
+
addRow(state.rows, inspection.record);
|
|
127
|
+
}
|
|
128
|
+
return state;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
function sortRows(rows: CoalitionRecord[]): CoalitionRecord[] {
|
|
132
|
+
return [...rows].sort((left, right) => Number(right.minimal) - Number(left.minimal) || left.surplus - right.surplus || left.members.length - right.members.length || left.mask - right.mask);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
function createAnalysis(prepared: PreparedInput, state: EnumerationState): CoalitionAnalysis {
|
|
136
|
+
const pivotTotal = Object.values(state.pivotCounts).reduce((sum, count) => sum + count, 0);
|
|
137
|
+
const pivotShares = Object.fromEntries(Object.entries(state.pivotCounts).map(([name, count]) => [name, pivotTotal === 0 ? 0 : count / pivotTotal]));
|
|
138
|
+
return { valid: true, parties: prepared.parties, totalSeats: prepared.totalSeats, threshold: prepared.threshold, totalCoalitions: 2 ** prepared.parties.length - 1, winningCoalitions: state.winning, minimalWinningCoalitions: state.minimal, pivotTotal, displayedCoalitions: sortRows(state.rows), pivotCounts: state.pivotCounts, pivotShares, warnings: prepared.warnings };
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export function analyzeCoalitions(inputs: PartyInput[], threshold: number): CoalitionAnalysis {
|
|
142
|
+
const prepared = prepareInput(inputs, threshold);
|
|
143
|
+
if (typeof prepared === 'string') return { valid: false, error: prepared, parties: inputs, totalSeats: 0, threshold, totalCoalitions: 0, winningCoalitions: 0, minimalWinningCoalitions: 0, pivotTotal: 0, displayedCoalitions: [], pivotCounts: {}, pivotShares: {}, warnings: [] };
|
|
144
|
+
const totals = buildSeatTotals(prepared.parties);
|
|
145
|
+
return createAnalysis(prepared, enumerate(prepared.parties, prepared.threshold, totals));
|
|
146
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
import { SEORenderer } from '@jjlmoya/utils-shared';
|
|
3
|
+
import { coalitionMajorityCalculator } from './index';
|
|
4
|
+
import type { KnownLocale } from '../../types';
|
|
5
|
+
|
|
6
|
+
interface Props { locale?: KnownLocale; }
|
|
7
|
+
|
|
8
|
+
const { locale = 'en' } = Astro.props as Props;
|
|
9
|
+
const content = await coalitionMajorityCalculator.i18n[locale]?.();
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
{content && <SEORenderer content={{ locale, sections: content.seo }} />}
|