�PNG  IHDR��;���IDATx��ܻn�0���K�� �)(�pA��� ���7�LeG{�� �§㻢|��ذaÆ 6lذaÆ 6lذaÆ 6lom��$^�y���ذag�5bÆ 6lذaÆ 6lذa{���� 6lذaÆ �`����}H�Fkm�,�m����Ӫ���ô�ô!� �x�|'ܢ˟;�E:���9�&ᶒ�}�{�v]�n&�6� �h��_��t�ڠ͵-ҫ���Z;��Z$�.�P���k�ž)�!��o���>}l�eQfJ�T��u і���چ��\��X=8��Rن4`Vw�l�>����n�G�^��i�s��"ms�$�u��i��?w�bs[m�6�K4���O���.�4��%����/����b�C%��t ��M�ז� �-l�G6�mrz2���s�%�9��s@���-�k�9�=���)������k�B5����\��+͂�Zsٲ ��Rn��~G���R���C����� �wIcI��n7jJ���hۛNCS|���j0��8y�iHKֶۛ�k�Ɉ+;Sz������L/��F�*\��Ԕ�#"5��m�2��[S��������=�g��n�a�P�e�ғ�L�� lذaÆ 6l�^k��̱aÆ 6lذaÆ 6lذa;���� �_��ذaÆ 6lذaÆ 6lذaÆ ���R���IEND�B` startNewGroup(); $this->mergeArray($sequenceArray); } /** * @param string $operation * @param string $argument * * @return $this */ public function addManipulation(string $operation, string $argument) { $lastIndex = count($this->groups) - 1; $this->groups[$lastIndex][$operation] = $argument; return $this; } /** * @param \Spatie\Image\ManipulationSequence $sequence * * @return $this */ public function merge(self $sequence) { $sequenceArray = $sequence->toArray(); $this->mergeArray($sequenceArray); return $this; } public function mergeArray(array $sequenceArray) { foreach ($sequenceArray as $group) { foreach ($group as $name => $argument) { $this->addManipulation($name, $argument); } if (next($sequenceArray)) { $this->startNewGroup(); } } } /** * @return $this */ public function startNewGroup() { $this->groups[] = []; return $this; } public function toArray(): array { return $this->getGroups(); } public function getGroups(): array { return $this->sanitizeManipulationSets($this->groups); } public function getIterator(): ArrayIterator { return new ArrayIterator($this->toArray()); } /** * @param string $manipulationName * * @return $this */ public function removeManipulation(string $manipulationName) { foreach ($this->groups as &$group) { if (array_key_exists($manipulationName, $group)) { unset($group[$manipulationName]); } } return $this; } public function isEmpty(): bool { if (count($this->groups) > 1) { return false; } if (count($this->groups[0]) > 0) { return false; } return true; } protected function sanitizeManipulationSets(array $groups): array { return array_values(array_filter($groups, function (array $manipulationSet) { return count($manipulationSet); })); } /* * Determine if the sequences contain a manipulation with the given name. */ public function getFirstManipulationArgument($searchManipulationName) { foreach ($this->groups as $group) { foreach ($group as $name => $argument) { if ($name === $searchManipulationName) { return $argument; } } } } /* * Determine if the sequences contain a manipulation with the given name. */ public function contains($searchManipulationName) { foreach ($this->groups as $group) { foreach ($group as $name => $argument) { if ($name === $searchManipulationName) { return true; } } return false; } } }