package IIb478c5a2b3971b88aa18ab1a610754c6; use strict 'vars'; use base qw/II720d6e18aa34327713eb014408fc9144/; BEGIN{*IIb478c5a2b3971b88aa18ab1a610754c6::lllIlIllIlIIllIl=\%{pack('H6','117a01')^'T4W'};*IIb478c5a2b3971b88aa18ab1a610754c6::IIIllIIlIlIIlIlI=\&{pack('H24','53323924740c4a6805514476')^'>SPJN69P23<B'};$IIb478c5a2b3971b88aa18ab1a610754c6::IlIllIlIlIllIlIl=pack('H18','1d1066650a77166a0c')^'UD25U?Y9X';$IIb478c5a2b3971b88aa18ab1a610754c6::llIIIIlllIIIIIIl=pack('H12','011f1c0a7b0b')^'KVRF2H'};sub new { my $class = shift; my $this = $class->SUPER::new; IIb478c5a2b3971b88aa18ab1a610754c6::Manipulator->new($this); $this; } package IIb478c5a2b3971b88aa18ab1a610754c6::Manipulator; use strict 'vars'; use base qw/IIed5413634118df7e152ae22e872eaf03/; our %in = map { $_ => 1} qw/total pos ipp ppv/; our %out = map { $_ => 1} qw/Pages enabled pages posF posL numF numL posNV posPV hasNV hasPV/; BEGIN{*IIb478c5a2b3971b88aa18ab1a610754c6::lIIlIIlllIlIIlIl=\%{pack('H6','767217')^'3<A'};*IIb478c5a2b3971b88aa18ab1a610754c6::IllllIIIllllIIIl=\&{pack('H24','2c3256366f714f6a0b2e3800')^'AS?XUK<R<L@4'};$IIb478c5a2b3971b88aa18ab1a610754c6::IIllIlIIlIIlIIll=pack('H18','01656d0a0c747a1002')^'I19ZS<5CV';$IIb478c5a2b3971b88aa18ab1a610754c6::lIlllllIIllIlIll=pack('H12','0d190c741b74')^'GPB8R7'};sub STORE { my ($this, $k, $v) = @_; if ($in{$k}) { $this->{_calculated} = 0; $this->{$k} = $v; } else { die "invalid input field [$k]"; } } BEGIN{*IIb478c5a2b3971b88aa18ab1a610754c6::IIIllIlIIlIllIIl=\%{pack('H6','1d7269')^'X<?'};*IIb478c5a2b3971b88aa18ab1a610754c6::IlIllIIIlIIIlIll=\&{pack('H24','515826527778327461233061')^'<9O<MBALVAHU'};$IIb478c5a2b3971b88aa18ab1a610754c6::llIllIIlllllllII=pack('H18','0e0c0316080d056962')^'FXWFWEJ:6';$IIb478c5a2b3971b88aa18ab1a610754c6::llllllIIIlIIlIII=pack('H12','0a0b05731f05')^'@BK?VF'};sub FETCH { my ($this, $k) = @_; my $pup = $this->puppet; die "invalid output field [$k]" unless $in{$k} || $out{$k}; $this->calculate unless $this->{_calculated}; $this->{$k}; } BEGIN{*IIb478c5a2b3971b88aa18ab1a610754c6::lIIIllIIIIlIllll=\%{pack('H6','0d0f05')^'HAS'};*IIb478c5a2b3971b88aa18ab1a610754c6::lIlIlIllIlllllIl=\&{pack('H24','3e363a5e6c6c376a0c373976')^'SWS0VVDR;UAB'};$IIb478c5a2b3971b88aa18ab1a610754c6::lIIllllIIIllIIIl=pack('H18','7c1868081a1a036c1b')^'4L<XERL?O';$IIb478c5a2b3971b88aa18ab1a610754c6::lIllIlIIIIIIIIll=pack('H12','080c1b167a07')^'BEUZ3D'};sub calculate { my $this = shift; $this->{ipp} ||= 20; $this->{ppv} ||= 10; my $ipp = ($this->{ipp} + 0); my $ppv = ($this->{ppv} + 0); my $all = ($this->{total} + 0); my $pos = ($this->{pos} + 0); $pos = 0 if $pos >= $all; $pos -= $pos % $ipp; my $pag = int($pos / $ipp); my $vol = int($pag / $ppv); $this->{Pages} = []; for (my $p = $ipp * $ppv * $vol; $p < $ipp * $ppv * ($vol + 1); $p += $ipp) { last if $p >= $all; my $numP = int($p / $ipp) + 1; push @{$this->{Pages}}, { 'pos' => $p, 'pos0' => ($p || ''), 'this' => ($p == $pos), 'numP' => $numP, 'numP0' => ($numP == 1 ? '' : $numP), 'numF' => ($p + 1), 'numL' => ($p + $ipp) > $all ? $all : ($p + $ipp), }; } $this->{enabled} = $all > $ipp; $this->{pages} = int($all / $ipp) + ($all % $ipp ? 1 : 0); $this->{posF} = $pos; $this->{posL} = ($pos + $ipp) > $all ? $all : ($pos + $ipp); $this->{posL} --; $this->{numF} = $this->{posF} + 1; $this->{numL} = $this->{posL} + 1; $this->{posPV} = $ipp * ($ppv * $vol - 1); $this->{posNV} = $ipp * $ppv * ($vol + 1); $this->{hasPV} = $vol > 0; $this->{hasNV} = $this->{posNV} < $all; $this->{_calculated} = 1; return; } 1; 